Hello,

I'm remotely debugging a J2EE application from eclipse.
I developed an external tool that will copy the file I modified to the server and then debug the application from the server.
It used to work perfectly, but since a few days ago, it doesn't work anymore. This means that whenever I submit the new file, when I switch to debug mode the server seems to keep the old version of the jsp and, at the point where I modified the file, the debugging gets unsynchronized (since eclipse is reading the new version). I tried restarting tomcat, manually modifying the file on the server, pretty much everything, but the server still seems to keep the old version of the jsp.
I'm quite convinced this is only a matter of setting the server to that it recompiles the classes whenever a file gets modified. The problem is that since it used to work fine, and no apparent modification was made, I have no idea which setting that is.

Could someone give me some insight?

Thanks in advance

Recommended Answers

All 3 Replies

Not entirely sure what you mean here, but if you're modifying JSP's in Tomcat, then check its still set to development mode (http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html). Otherwise, if Eclipse is not updating java classes perhaps you haven't got 'build automatically' selected, or maybe theres a build error in your project?

Not entirely sure what you mean here, but if you're modifying JSP's in Tomcat, then check its still set to development mode (http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html). Otherwise, if Eclipse is not updating java classes perhaps you haven't got 'build automatically' selected, or maybe theres a build error in your project?

the thing is: I have an application that communicates with this RMI sever. The directory delivered by the vendor has the following structure :
-eMatrix
--api
--bin
--conf
--distrib
--ematrixwarutil
--etc
--java
--lib
--License
--pixmaps
--STAGING
--tcl80
--tcl83
--xml

above is the directory where I go and type "ant" in the command prompt to build the war file that I deploy on the server

in the "STAGING" directory, the structure is
-ematrix
--appdir1
--appdir2
--classes
--properties
--WEB-INF

where appdir# contains .jsp pages, .inc files and other .js and .html,
the "classes" directory contains a few .jar files and the "properties" directory contains .properties files.
what happens is that when I launch ant, it will build a war that corresponds to the webapp inside the "STAGING" folder.

what I find difficult to understand is that after deploying the war on the server, the structure changes. My ematrix.war files deploys into the following structure :

-ematrix
--appdir1
--appdir2
--META-INF
--WEB-INF
---classes
---lib

the "classes" directory containing the .properties files that used to be in the "properties" directory and the "lib" directory contains all the .jar files that used to be in the "classes" directory of the previous structure. both "properties" and "classes" directories under "ematrix" having disappeared.

now, when I import the war file into eclipse, it comes up with another different structure, similar to the server's, but instead of containing a "classes" folder under "WEB-INF", all the .properties files go under "Java Resources".

What I wish I could do is to build a project in eclipse from the first structure "eMatrix" (capital M), in which I'd be able to integrate all eclipse's functionality of building the war file, transferring it to the server, debugging from the server, etc., but I don't know how to take this folder (which I can't actually change because that's the way the application installs itself) and reference it from an eclipse project.

any help would be appreciated.

All right, I'm sorry I didn't make too much sense out of my posts. To sum it up, I want to have more insight on how to have a project on eclipse with the same structure as that provided from the vendor of the web application while having eclipse to manage building and deploying the resulting war to the server after performing customizations.
As per the first post, since tomcat is not running on the same machine as eclipse, updating files in the remote server is done by copying the new file to the server. Two issues may arise from this:
- if the war file is still in the webapps folder in the server, the newly uploaded file might be overwritten. Once the application is deployed, it might be wise to erase the war file and leave only the uncompressed folder.
- for some reasons I still don't get, some pages are cached in tomcat's work folder and some are not. Those that are cached won't be modified by replacing the file, you must actually stop tomcat, remove the contents of the work folder and restart it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.