Announcement Announcement Module
Collapse
No announcement yet.
Cannot resolve environment variable in tomcat on windoze Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot resolve environment variable in tomcat on windoze

    I have a servlet that runs in tomcat 7 and uses environment variables to locate the external properties file.

    This works perfectly well under linux but does not work under windoze as it cannot extract the environment variable. I have checked the variable does exist in windoze and has the correct value.

    Is there a jar file that I need to load in tomcat on windoze, though I have checked the lib directory against the linux version and it seems to have the correct jars. Or perhaps there is some additional setting I need to initialize in tomcat under windoze for this to work?

    This is the code in the servlet xml configuration file that works under linux but not windoze.

    Code:
    <util:properties id="IRFUPROP" location="file://${IRFUPROP}"/>
    <context:property-placeholder properties-ref="IRFUPROP"/>

  • #2
    OMG, this problem just reminded me why I can't stand windoze.

    Having set the environment variable, it is not enough to restart the tomcat service. You have to restart the whole damn system. I forgot all about that and only stumbled on it because I had to restart the system to install some new software.

    So the answer is that as with everything else windoze related, you have to restart the whole system when you set an environment variable.

    Comment

    Working...
    X