简体   繁体   中英

how to pass parameters to jetty service

When i run jetty in the following way:

set PROJECT_HOME=%CD%
start java  -Dproject.home="%PROJECT_HOME%" -DSTOP.PORT=8079 -DSTOP.KEY=stop -jar start.jar etc/jetty-logging.xml etc/jetty.xml

i am able to use parameter PROJECT_HOME in mycontext.xml :

SystemProperty name="project.home" default=""

Is there any way to pass PROJECT_HOME to mycontext.xml when I run jetty from Jetty-Services.exe

Thanks in advance.

Assuming you are using Windows Service Wrapper.

I think you can configure this in the jetty-service.conf

wrapper.java.additional.1=-Djetty.home=../projectHome

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM