Monday 31 March 2014

Creating Java Swing applications that post files to AEM ClientLibs folders

You can create a custom Java Swing client application that lets a user select a file from the local desktop and post the file to an AEM ClientLibs folder. In most AEM applications, you create a ClientLibs folder to store required application files such as CSS file and JS files. In some cases, you can place third-party files like JQuery JS files when you want to incorporate functionality offered by these files into your AEM application.

The following illustration shows CSS and JS files located in an AEM client libs folder.



For more information about a ClientLibs folder, see Using Client-Side Libraries.

Note: There are other ways to get files into a ClientLibs folder. For example, you can use the CRXDE tool to drag and drop files from the local desktop to a ClientLibs folder. However, there are drawbacks to using CRXDE to drag and drop files from the desktop to an AEM client libs folder.

To develop a Java Swing application that posts files to an AEM client libs folder, you use Java APIs located in the org.apache.http package. The APIs located in this package lets you post files to a custom AEM Sling Servlet. The Sling Servlet saves the file in the specified ClientLibs folder using the JCR API.



The following illustration shows the Java client application that is created in this development article.


A Java client application that posts files to an AEM ClientLibs folder

To read this development article, click http://helpx.adobe.com/experience-manager/using/post_files.html.

To watch the video, click:



Join the Adobe Experience Cloud Community 

Join the Adobe Experience Cloud Community by clicking this banner




I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with 20 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeExpCare.

YouTube: Subscribe to the AEM Community Channel