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 setting the following may help:
org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR=false
Does anyone know where to set this? Should this be set in web.xml
, context.xml
or somewhere else?
The other thing I want to check is the following:
org.apache.catalina.STRICT_SERVLET_COMPLIANCE
Select Run > Run Configurations. Make sure your server is selected. Select Environment Tab.
You could add necessary properties to catalina. properties file in <tomcat installation directory>/conf directory. All system properties are available including those set using the -D syntax, those automatically made available by the JVM and those configured in the $CATALINA_BASE/conf/catalina. properties file.
Right click the "Computer" icon in the Start Menu, and choose "Properties" from the context menu. Click the System Tab. You should see a list of information about your system, including your chip architecture and whether you are running a 32- or 64-bit version of Windows.
Open the Tomcat configuration tool from the Windows menu at Start > All Programs > Apache Tomcat > Tomcat Configuration. Click Configure and select the Java tab. Stop and restart the application server.
You can set any of the system properties in
apache-tomcat-7.0.33\conf\catalina.properties
file. Adding your entry in this file should resolve your problem.
E.g.
environment=local
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With