I have migrated a Web Application from MyEclipse to Eclipse WTP, and I am now in the middle of the first major upgrade to the code base and web pages after the migration, and it is frankly driving me mad that saving a JSP page causes a redeployment of the WHOLE application, as it takes time and that my backend connection does not survive the serialization-deserialization of the session object (which is non-trivial to fix). In addition to that the JSP-editor is insanely slow so I frequently have to pause to let the editor catch up to be certain where my edits go in a small JSP using JavaServer Faces. Disabling validation did not help.
The Eclipse Dynamic Web Project depends on several library eclipse projects so I cannot just tell e.g. Jetty to use the WebRoot folder, as several dependencies are then missing from the classpath.
The question is:
I can use Tomcat 5.5 or Jetty 6 as servers.
EDIT: Having the JSP-editor being able to keep up would be really nice too...
EDIT: The JSP-pages in question contain JSF-tags (myfaces 1.1.4, tomahawk 1.1.9), if that makes a difference?
in your Tomcat server settings in eclipse you should enable the option 'Serve modules without publishing' (see below how to do this)
this is the solution i use and it enables me to view changes in JSP's immediately without republishing or anything else (on Tomcat 5.5 + regular dynamic web project + JSP's are in WebContent directory) so i don't go nuts when developing Java apps:
how to do this:
UPDATE: you should also make sure that the libraries you depend on (those on your build path) are 'copied' to WEB-INF/lib while developing in Eclipse (do this by selecting the appropriate JARs/projects in the Java EE Module Dependencies section in the Preferences dialog of your web project). with all these settings in place tomcat will run the web application from your workspace project with the WebContent dir as root of the web app.
enjoy
I'll throw-in another suggestion, which is more of a workaround.
You can use the FileSync plugin to synchronize your bin
and webroot
directories with your servlet-container. You will have to use the original installation, and not workspace metadata this way. Then, after starting the server in debug mode, everything is hot-deployed.
I have successfully used this approach with glassfish 2.
Another thing is to check the configuration options of the server in your Servers
project (it should have a folder there). It might be the case that some debug
or hot-deploy
option is switched off.
As for the speed of the JSP editor - well, disabling validation is the first thing to do, and you've done it. Honestly, my jsp pages (containing jsf tags, and actually using facelets) don't have any major problems with speed. Perhaps use a fresh installation?
You can disable automatic publishing in Eclipse if you need to:
This will avoid the "publish after every save" problem. However, with this turned off you will have to manually deploy any time you want your changes to show up in your server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With