如何在Jetty中配置webapps部署目录 [英] How to configure a webapps deployment directory in Jetty

查看:1490
本文介绍了如何在Jetty中配置webapps部署目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这一定是个简单的答案,但我似乎找不到!



刚刚开始在 CentOS 5.5 上使用 Jetty 7.0.2 ,并部署了一个 webapp 与默认设置(只需将我的WAR文件放在 / webapps 目录中)。当Jetty启动时,它将战争提取到 / tmp / jetty {something-warfilename-etc}目录中。



我知道Jetty有可以实现的自定义配置的加载,但是现在,我只想设置提取的war文件的位置,以便我可以修改 .properties 文件等在安全地飞行。



提前感谢!

解决方案

为什么不把打包的war文件放在 webapps /



如果Jetty在 docs say 中发现,如果Jetty在 $ JETTY_HOME / webapps / 它会很高兴地将其部署为一个servlet webapp。然后,您可以调整属性文件,而无需更改任何Jetty设置。



这也意味着您不用担心Jetty会覆盖属性文件的任何更改一个新版本的应用程序(尽管您还需要小心)。


This must be a dead simple answer but one I just can't seem to find!

I've just started using Jetty 7.0.2 on CentOS 5.5 and have deployed a webapp with the default settings (by just placing my WAR file in the /webapps directory). When Jetty starts up, it extracts the war into the /tmp/jetty {something-warfilename-etc} directory.

I understand that Jetty has loads of custom configuration that can be implemented, for now, however, I am just interested in setting the location for the extracted war files so that I can modify .properties files etc on the fly safely.

Thanks in advance!

解决方案

Why not just put the unpacked war file in webapps/?

As their docs say, if Jetty finds a directory in $JETTY_HOME/webapps/ it will happily deploy it as a servlet webapp. Then you can adjust the properties file without changing any Jetty settings.

This also means that you don't have to worry about Jetty overwriting any changes to property files when you have a new version of the app (though you still have to be careful about that).

这篇关于如何在Jetty中配置webapps部署目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆