Here are the servlet definitions as defined in my web.xml file ...
I have ANT set up so that when I execute the ant command, a build directory is created under the root netcomm directory which contains the $ROOT/netcomm/builds/WEB-INF/classes/com/ .... /HelloWorldExample.class file.
If I move the build WEB-INF application directory structure to the root application directory ($ROOT/netcomm/WEB-INF/classes/com/ .... /HelloWorldExample.class etc.), then everything works fine.
My question, is however, what is the best way to set up my development environment so that I can just type ant and have everything work without having to move directory etc. or restart tomcat server?
The documentation says something about either resetting CATALINA_BASE or using the Manager application ...
Can anyone advise regarding the correct way to set up a Tomcat development environment using ANT in the most efficient way possible?
Who created ANT script? Why don't you just modify the script to deploy to proper location?
Ideally ANT script should get you code from version control system, compile the code, create war file and deploy to Tomcat. Read about Tomcat Manager, particularity about Executing Manager Commands With Ant
Joined: Nov 12, 2006
Hi and thank you for your reply ...
I understand that ANT can create the WAR file and copy it to the proper location.
I was curious what the best way to set up my development environment would be.
Perhaps I should add a copy from the $ROOT/myapp/build/WEB-INF to $ROOT/myapp/WEB-INF?
Was just wondering if someone with some Tomcat development experience could help me out with understanding the best way to set up a development environment.
I appreciate your feedback and if you do have any more info that may help me, I am very grateful.
Joined: Nov 12, 2006
Thanks Misha ...
So here is what I did ...
Added ant copy directive to my build.xml to file to copy $ROOT/builds/WEB-INF/classes to $ROOT/WEB-INF/classes.
Added ant clean directive to delete $ROOT/WEB-INF/classes in addition to $ROOT build.
Added ant reload directive for Tomcat Manager to reload context.
I did see that the documentation you referenced suggests building a new .war file upon reload.
Will modify later when I get closer to deploying live app.