WAR files

Web app projects produce WAR files. You cannot save the script in Eclipse to create the WAR file. For the CJDMessageServer and CJDRequestServer projects in NetConfig, you must do these steps.

If you do it when the corresponding Tomcat server is running, then the effects are automatic. Tomcat notices the change and it is not necessary to restart the thread.

  1. Right-click the project name and select Export.
  2. Select Web > WAR file and click Next.
  3. Click Browse to locate the corresponding existing WAR file.
    For MessageServer it is $HCISITEDIR/MessageServer/apache-tomcat-7.0.8/webapps/CJDMessageServer.war.
  4. Optionally, you can select Optimize for a specific runtime.
  5. Click Finish to export the WAR file.
    It is better to do this when the corresponding Tomcat instance is already running. If not, then clear the created directory under Tomcat's webapps and work directories for the changes to take effect when you start Tomcat. This is standard Tomcat behavior.
  6. Create the JavaDriver site and open the IDE.
  7. Configure the Java Driver thread. For information about the sample site, see Usage.
  8. Add the debug information in the JVM section.
    • For Cloverleaf 6.1 and later versions, create a process_name.pni (bounce.pni) file which has the same process name in the $HCISITEDIR directory.
    • For Cloverleaf 6.0 and earlier versions, create a thread_name.ini file (Bounce.ini) which has the same thread name in the $HCISITEDIR directory.
  9. Open the new file and add the line beginning with user=-agentlib to the JVM section. This setting should be the same as what you defined in Eclipse.
    [JVM]
    CLASSPATH = $ROOTPATH/lib/java/JavaDriver.jar # all projects need the driver
    CLASSPATH=./CJDBounce.jar # Starting in start_DIR so relative ok, get .jars
    user=-agentlib:jdwp=transport=dt_socket,server=y,address=7013,suspend=y
    • transport=dt_socket indicates "standard(socket attach)" defined in Eclipse.
    • server=y indicates it works as a server to wait for the debugger to be attached.
    • address = 7013 indicates it uses port 7013, which is defined in the Eclipse configuration.
    • suspend=y indicates the JVM stays there until the debugger is attached and runtime is resumed.
    These settings can also be added in the IDE in the Process Configuration dialog box, in the Additional JVM Options section of the Java Driver > Java Options tab. The settings are saved to a .pni file for the bounce process.
  10. Open the Network Monitor in the IDE and start the bounce process. To ensure jdwp is running, you can check the process engine log that is "enable_all" in the log level.
  11. In Eclipse, attach the debugger to JVM.
  12. Debug the CJDBounce project, that is, remote Java app, after breakpoints are set.
  13. To end process testing, stop the bounce process in Network Monitor after resuming Java source debugging in Eclipse.