• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Tomcat 3.3 jk_nt_service & TOMCAT_OPTS

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:

 
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic