开发者

Remote Development Workflow with Tomcat and Eclipse

开发者 https://www.devze.com 2022-12-28 22:43 出处:网络
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 i

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?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消