Tomcat 7 - where do I set 'system properties'?

后端 未结 5 1819
-上瘾入骨i
-上瘾入骨i 2020-12-05 06:55

My webapp is having an issue since upgrading to Tomcat 7. My session will go null after I login and try to do anything (submitting a request). I\'ve read that s

5条回答
  •  遥遥无期
    2020-12-05 07:43

    You can set system properties in Tomcat by creating a setenv.sh file in /bin directory. I did the following to set the system properties.

    export JAVA_OPTS="-Dmyprojectvar.subname=value -Danothervariable=value -Danother.variable=value"
    

    Remember:

    There is no space between the export JAVA_OPTS and =. Also: the symbol & is different, use ..

    Now, run your catalina.sh to start tomcat.

提交回复
热议问题