posted 12 years ago
Welcome to the JavaRanch, Xavier! For the most part, whether you have the Apache httpd server fronting Tomcat or not makes little difference in how you debug J2EE webapps or even whether/which connectors you are using to make Apache talk to Tomcat.
Your question probably is more of an Eclipse question, but I can give you some general information.
Eclipse itself doesn't support J2EE. Actually, it doesn't really even support Java, since Eclipse itself is just a general framework. Most people don't download and install the core Eclipse, however, they get one of the Java or J2EE development bundles which contain plugins that make it possible for Eclipse to support creating and debugging webapps with Tomcat. The J2EE bundle comes with a vile but popular subsystem called WTP, which I ignore because I find life to be easier when I install the sysdeo Tomcat plugin.
However, regardless of what you use to start, stop, and configure Tomcat with, in order for changes to JSPs to be picked up and used without having to restart Tomcat, a few basic conditions have to be met:
1. The copy of Tomcat you are using must be configured to sense changes to a WAR (this is enabled by default)
2. You must be working with an exploded copy of the WAR, since a "pure" WAR is a ZIP/JAR file, and you cannot update individual files in a JAR using JAVA, you can only replace the entire WAR file. And you do not want that.
3. You must update the actual copy of the WAR that Tomcat is using. Tomcat cannot reach back into the Eclipse project and pull in loose source components. If you change a JSP, that JSP must be changed in the WAR.
4. You must have patience. What Tomcat actually does is make periodic scans of the WAR and look for changed resources. The changes only take effect after Tomcat has seen these changes. Normally the scan happens every few seconds, but some of us can be VERY impatient!
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer