views:

60

answers:

2

Currently, I have tomcat installed on the production server to serve my java webapps. I develop in eclipse at my personal workstation and then I use an ant script to build the project into a war file and deploy that on the server.

This setup works well when I am on the same network as the server because deploying is almost instantaneous. However, now that I am working remotely uploading the war file to the server is slow and in most cases very redundant (there are about .5 GB of static media included in the war file).

Is there a better way to update my webapp on tomcat from eclipse and if so what are the best options for implementing such a solution with minimal effort?

+1  A: 

Checkout rsync. It transmits just the updates to the file, so it will greatly speed up your process. Also depending on how complex your application is you might look into installing jetty on your personal workstation. It works well with eclipse and lets you check the new code almost instantaneously.

Vlad
A: 

What it sounds like you want is to have the exploded war file(your root app/result of ant compile) sit in your tomcat web-apps folder. Tomcat will deploy it based on the host or context tag in server.xml.

This way, you can just drop your $app/WEB-INF/classes into the application and, if context reload is enabled, the new files will be deployed immediately.

ClutchDude