I am new to building Java web applications & WAR files. I am working with a fairly large web application that is built on Java & JSP pages. We have a ANT file that will re-build the entire application every time a single change was made. I want to know if it is possible to only re-build the part of the application that was modified instead of the whole entire project.
Testing is a 10 minute process because I will make a change, shutdown Tomcat, run the ANT script, start Tomcat, re-load application in browser which now takes 7min to do load for the first time after a re-build (I'm also curious to know what it's doing here?)...Basically complete hell for testing.
If anyone could suggest a better testing strategy I would be awesome! Also maybe anyway we would just have the ANT script re-build only modified classes.
There are several things one can do.
One can modify jsp in the tomcat/temp directory. The change will be available immediately without any recompiling/reloading
One can use the remote Tomcat debugging (from Eclipse). This debugging allows one to change the source code and this change will be propagated to Tomcat immediately
The best way to organize your ant script is to separate compiling into several jars and then creating a war file. Then recompilation for one change will happen only in one jar.
It is not required to restart Tomcat under redeployment if you specify reloadable=true for the context
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