Showing posts with label tomcat. Show all posts
Showing posts with label tomcat. Show all posts

Wednesday, February 11, 2015

Tomcat context.xml

You may want to have a context.xml file uner your vcs.
You might have some config in there e.g.

Context
   Environment name="jsf/ProjectStage" override="true" type="java.lang.String" value="Development"
   
   Manager className='org.apache.catalina.session.PersistentManager'/
      Store className='org.apache.catalina.session.FileStore'/
   /Manager
/Context

You can then publish this file with IntelliJ
 Edit Configuration... -> Deployment -> Edit Artifact -> Add file
 The context.xml file must reside in META-INF/context.xml

Thursday, February 16, 2012

Disable session saving in tomcat

When starting Tomcat you may have such an error:



Feb 16, 2012 10:24:15 AM org.apache.catalina.session.StandardManager doLoad
SEVERE: IOException while loading persisted sessions:
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException:


If you are developing and changing your code regularly, it is most annoying. The easiest is to convince tomcat not to persist sessions across Tomcat restarts.

1. Got to file: context.xml (in eclipse, you find it under Serves->tomcat v7.0 at localhost. or something equivalent)
2. Uncomment

That's it.

Wednesday, May 4, 2011

Setting tomcats'language

I unfortunately have to work with computers with default language set to German.
Until now I was always able to change the language, but Windows does really support this. Which means I have part of my computer in English and many application remain in German.
It is very annoying for stack trace for instance.

Thus you can set the language of apache tomcat via a system property.
In eclipse you can set

-Duser.language=en

as VM argument to the launch configuration of tomcat.