aspose file tools*
The moose likes Tomcat and the fly likes Tomcat 3.3 jk_nt_service & TOMCAT_OPTS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 3.3 jk_nt_service & TOMCAT_OPTS" Watch "Tomcat 3.3 jk_nt_service & TOMCAT_OPTS" New topic
Author

Tomcat 3.3 jk_nt_service & TOMCAT_OPTS

Dan Gunawan
Greenhorn

Joined: Jul 25, 2005
Posts: 5
Hi all,

I'm currently having some problem on which whenever my instance of Tomcat is started using Windows service, it's not picking up the value of whatever parameter I have previously defined on TOMCAT_OPTS variable in my tomcat.bat file.

However, if I start Tomcat from clicking the startup.bat from %TOMCAT_HOME%/bin directory, I can access my parameter defined on TOMCAT_OPTS variable.

Does anyone know on how to get around this? I can't upgrade Tomcat or JDK as I'm supposed to look at a problem being experienced on an old system.

I'm carrying out this test on a dev machine with Win2000, JDK1.4 and using Tomcat's HelloWorld servlet example to retrieve the variable.

From HelloWorldExample.java
out.println("System.getProperty(): " + System.getProperty("aaa.test.aaa") );

From wrapper.properties file:
wrapper.cmd_line="$(wrapper.javabin)" -Djava.security.policy=="$(wrapper.tomcat_policy)" -Dtomcat.home="$(wrapper.tomcat_home)" -classpath $(wrapper.class_path) $(wrapper.startup_class) -config $(wrapper.server_xml) tomcat

From tomcat.bat file:
set TOMCAT_OPTS=-Daaa.test.aaa=C:\jakarta-tomcat-3.3.2\logs\jvm.stderr

Thanks
Dan Gun
Greenhorn

Joined: Aug 06, 2003
Posts: 26
Answer:

put the variable definition, in my case (-Daaa.test.aaa=C:\jakarta-tomcat-3.3.2\logs\jvm.stderr), into wrapper.properties like the following:



SCJP 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat 3.3 jk_nt_service & TOMCAT_OPTS