Link your IDE, VCS and Servlet Container and Develop Plugin with Minimal Tomcat Restarts
Novell Cool Solutions: Feature
By R Sathish
Reader Rating 
|
Digg This -
Slashdot This
Posted: 17 Aug 2004 |
Please read my article on iManager development tips prior to using this procedure.
Please refer to Launching iManager with Eclipse to launch iManager in debug mode.
The strategies described in this article are applicable to any IDE, VCS and Servlet Container. I have illustrated them with Eclipse IDE, Continuus VCS and Tomcat servlet containers. These strategies reduce the time required to change the plugin, minimizing the number of Tomcat restarts required, and the number of CPU-intensive tasks.
| Step 1 -- Make your work area modifiable | |
In Continuus:
- Right-click the work area.
- Select Work area properties.
- Select Maintain a work area.
- Select Make copies modifiable.
- Save the settings.

Click for larger view.
| Step 2 -- Create a modular directory structure | |
Recommended work area structure
RED directories are created by any build task.
BLACK directories are part of work area.
![]() |
![]() |
| Step 3 - Make the source path of your IDE project point to VCS work area | |
In Eclipse:
- Window - > Open perspective -> Java
- Right-click project in package explorer.
- Select Properties.
- In the pop-up window, select Java Build path -> Source.
- Click Add folder.
- Create new folder.
- Choose advanced-> Link to folder in file system.
- Enter a name.
- Select the Continuus work area \ plugin\src
- Save.

Click for larger view.
In the same steps
Include in the source path *.properties, if they are in different directory.
| Step 4 - Make the output path of IDE project to Tomcat's classes | |
Output path = TOMCAT_HOME\webapps\nps\WEB_INF\classes
In Eclipse:
- Window - > Open perspective -> Java
- Right-click project in package explorer.
- Select Properties.
- In the pop-up window select Java Build path -> Source.
- Default output folder -> Browse
- Click Add folder.
- Create new folder.
- Choose advanced-> Link to folder in file system.
- Enter a name.
- Select path to TOMCAT_HOME\webapps\nps\WEB_INF\classes
- Save

Click for larger view.
| Step 5 -- Make a batch file | |
Make a batch file in %WINDIR% (or a directory in your PATH) which
- Deletes plugin.jar
- Copies *.js from Tomcat to Work area
- Copies *.jsp from Tomcat to Work area
Run the batch file to delete plugin.jar
I:\Windows\EA.bat listing

| Step 6 -- Modify Java source file in IDE, compile and reload NPS. | |
In Eclipse:
- Select Project -> Build automatically
- Modify the source code (Java or properties )
- Reload NPS
- Login to iManager

Click for larger view.
| Step 7 -- Include plugin directory to IDE | |
PLUGIN_HOME = TOMCAT_HOME\webapps\nps\portal\modules\plugin
In Eclipse:
| Step 8 -- Modify JSP and JS in IDE. | |
In Eclipse:
- Select Java perspective.
- Choose the PLUGIN_HOME.
- Navigate to Jsp / Js file.
- Modify the files.
- Reaccess the Jsp page.
- See your changes instantly.
Please note:
Tomcat class reloader does not work in sync with Jasper. Therefore, when you change method signatures in java and access that method in jsp, you need to restart Tomcat.
| Step 9 - Update work area | |
- Open a command shell
- Execute plugin.bat
This will copy all Jsp and Js from Tomcat to Work area.
| Step 10-Reconcile the Continuus project | |

Click for larger view.
- Choose Select task.
- Create a task.
- Reconcile.
- Choose advanced conflict resolution.
- Compare to ensure new changes.
- Select all conflicts.
- Choose Update database from work area.
- Check in the task.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com


