The Win32 Wrapper, Makes Jetty Running as a Windows NT Service Possible.
The Win32Wrapper makes use of Java Service Wrapper, see http://wrapper.tanukisoftware.org
(in your <jetty-root>/bin) Jetty-Service.exe --install jetty-service.conf or Jetty-Service.exe -i jetty-service.conf |
(in your <jetty-root>/bin) Jetty-Service.exe --start jetty-service.conf or Jetty-Service.exe -t jetty-service.conf |
(in your <jetty-root>/bin) Jetty-Service.exe --stop jetty-service.conf or Jetty-Service.exe -p jetty-service.conf |
(in your <jetty-root>/bin) Jetty-Service.exe --remove jetty-service.conf or Jetty-Service.exe -r jetty-service.conf |
Note: The above application (Jetty-Service.exe) must execute with administrator rights otherwise, it fails.
In Vista, even with administrator account the service fails to install. Giving an error 'OpenSCManager failed'.
Below is the solution to this problem. This will now open a command prompt window with administrator rights.
Go to Start | All Programs | Accessories, then right-click on "Command Prompt", and select "Run as administrator". |
Setting a Jetty Configuration XML for Windows Service Wrapper can be done by editing jetty-service.conf found in your <jetty-root>/bin
change the
... wrapper.app.parameter.1=../etc/jetty.xml ... |
to any jetty xml configuration of your choice
Example:
... wrapper.app.parameter.1=../etc/jetty-ajp.xml ... |
you can also set multiple jetty configuration XMLs, Just add a new line of configuration code, following the pattern below:
wrapper.app.parameter.<parameter number>=<jetty xml configuration path> |
Example:
... wrapper.app.parameter.1=../etc/jetty.xml wrapper.app.parameter.2=../etc/jetty-plus.xml wrapper.app.parameter.3=../etc/jetty-ajp.xml ... |