ASF Bugzilla – Full Text Bug Listing
|Summary:||Documentation of Service-Installer missing one information|
|Product:||Tomcat 7||Reporter:||Christian Kütbach <ckuetbach>|
|Component:||Documentation||Assignee:||Tomcat Developers Mailing List <dev>|
Description Christian Kütbach 2011-11-25 09:03:49 UTC
The documentation of the windows service installier is missing one information. If one wants to create a service with a sepified PATH, it may not work: Citadation from the documentation: http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html List of environment variables that will be provided to the service in the form key=value. They are separated using either # or ; characters. Original documentation: http://commons.apache.org/daemon/procrun.html List of environment variables that will be provided to the service in the form key=value. They are separated using either # or ; characters. If you need to embed either # or ; character within a value put them inside single quotes. The last part is important, but missing: "If you need to embed either # or ; character within a value put them inside single quotes." The ';' is the windows path-seperator-char and the path has to be masked by ' if it contains more than one directory. This is missing in 5.5 and 6.0 as well.
Comment 1 Konstantin Kolinko 2011-11-25 13:29:28 UTC
You sound like you have tried this feature. Can you provide an example that is close to what you used in real life? What version of Tomcat you used? From the description at  it is not clear to me where the quotes should be placed. Did you use key='value;value' or key=value';'value ?  http://commons.apache.org/daemon/procrun.html
Comment 2 Christian Kütbach 2011-11-25 13:41:59 UTC
I used tomcat 5.5.34. Within my application I have to load a native *.dll file, which is loading another .dll. Therefor I needed to set the windowns PATH variable for the created windows service. First I set the path like this: tomcat5.exe //US//MY_SERVICE_NAME --Environment "PATH=.\;c:\path\to\bin" The installed Windows service did not start at all, because the value inserted into the windows registry was not correct. The documentation said that the value provided for --Environment is splitted at ; and also #. So I had to mask the windows-path. I changed by script into this: tomcat5.exe //US//MY_SERVICE_NAME --Environment "PATH='.\;c:\path\to\bin'" and it worked just fine. I think all versions of tomcat since 5.5 until now uses the same windows service wrapper.
Comment 3 Mark Thomas 2011-12-26 20:56:08 UTC
Thanks for the clarification. I have updated the docs for trunk, 7.0.x, 6.0.x and 5.5.x. I used a slightly different form of words.