Tuesday, December 2, 2014

Synchronizing files in Eclipse




File Synchronization for JSP :
While developing web applications, we frequently change JSP contents, but in order to reflect those changes we often copy the file into .WAR folder deployed on the server. Though it is small steps as we are used to, but how good it will be if we have changes reflecting automatically….doesn’t it sounds pretty cool???
Here we go…
There is a plugin called FileSync for eclipse IDE.
Here are the steps to enable:
Step1: Download the following JAR from the location: http://andrei.gmxhome.de/filesync/links.html
Download which ever the version is suitable for your eclipse.
(Or, if you have Eclipse Marketplace [Help > Eclipse Marketplace... in Eclipse Indigo and above], use this URL: http://marketplace.eclipse.org/content/filesync)

2. Place this JAR in eclipse/dropins directory and restart eclipse.

3. In Project Explorer, right click the project which has the JSP files and choose Properties.

4. In the Properties window, select "File synchronization" on the left.

5. Select the checkbox "[] Enable FileSync builder for project".

6. Click on "Add Folder" button and select the folder which is the root folder of all JSP files (for eg, you may select Project/j2ee-apps/XXX/Module.war folder).

7. Click on "Browse..." button against "Default target folder" and choose the WAR folder inside your deployed EAR folder in the app server (for eg, in Jboss, it would be
C:\jboss-eap-5.1\jboss-as\server\{server-configuration}\deploy\{Project}.ear\{module}.war).

8. Click OK.

9.FileSync plugin does an initial synchronization. Test it by making small changes to JSP , and see the changes reflected.
This reduces lots of time while developing.
Enjoy coding…..
Thanks ,
Shyamala