I am trying to develop a JSP with tomcat 7 but I am finding that each time I make a change to it the I have to undeploy the app through tomcat manager and then deploy it again. Is there some sort of configuration I need to do inside of Tomcat to prevent me from needing to redeploy after each change?
Edit for current set up:
I am using eclipse as my IDE, then using command line maven to clean and package my app.
With maven you can include the deployment as part of the build process:
But if you don’t want to run maven every time you make a small change you can still have those changes deployed automatically. You would need to connect Tomcat with Eclipse,
right click on the Servers view => Add server, and configure the application for automatic deployment:Also, if you are using Eclipse you don’t need to run maven from the command line. Install the M2Eclipse plugin and you can run it from Eclipse. Once you install the plugin you can add Maven nature to the project by doing
Right click project => Maven => Enable Dependency Management.Then you can do
Right click on project => Run as => Maven installto trigger the full lifecycle.One more tip, if you double click on the server you added to the Servers view you will get to the server Overview. Here you can choose whether to let Eclipse take control of the server, under “Server Locations”. NOTE: you can only change your selection if no applications have been published to the server.
If you let Eclipse take control of Tomcat all the application’s files will be deployed to the actual server. Otherwise some of the files will be on the server and some on Eclipse’s controlled directories (either in the workspace or in the eclipse installation dir – don’t recall).