Auto-reloading WAR in Jetty standalone

℡╲_俬逩灬. 提交于 2019-12-10 10:57:31

问题


I have a WAR deployed to Jetty 9.0.0.M3. I am trying to figure out what I need to set in my context in order to be able to have it reloaded every time I upload an updated war file (without having to restart Jetty).

I had a look at the docs, but I'm afraid I couldn't find what I was looking for. I only know how to do this with the embedded Jetty Maven plugin, but not with the standalone.

Any help would be appreciated! Thanks.


回答1:


The key is in the deployer. You need to wire up the deployment manager functionality and have it manage the starting of the webapp.

http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java

The jetty xml files are effectively a thin skin over java so look the following xml file which is what jetty uses for the traditional webapp startup of our distribution.

http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty-deploy/src/main/config/etc/jetty-deploy.xml

This ought to get you fixed up.



来源:https://stackoverflow.com/questions/13965643/auto-reloading-war-in-jetty-standalone

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!