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

Tomcats Infamous “SEVERE: Error listenerStart”

I refere to this http://java.dzone.com/articles/tomcat-6-infamous-%E2%80%9Csevere article to solve the logging problem. So if you need more logging from your tomcat server "just" create a “logging.properties” file under your”/WEB-INF/classes” folder of your WAR and you’re all set.
org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler
If your are working with IntelliJ, you can add the file Edit Configuration... -> Deployment -> Edit Artifact -> Add file