How can I specify system properties in Tomcat configuration on startup?

cliff.meyers‘s original answer that suggested using <env-entry> will not help when using only System.getProperty() According to the Tomcat 6.0 docs <env-entry> is for JNDI. So that means it won’t have any effect on System.getProperty(). With the <env-entry> from cliff.meyers‘s example, the following code System.getProperty(“SMTP_PASSWORD”); will return null, not the value “abc123ftw”. According to the Tomcat … Read more

How to set the context path of a web application in Tomcat 7.0

What you can do is the following; Add a file called ROOT.xml in <catalina_home>/conf/Catalina/localhost/ This ROOT.xml will override the default settings for the root context of the tomcat installation for that engine and host (Catalina and localhost). Enter the following to the ROOT.xml file; <Context docBase=”<yourApp>” path=”” reloadable=”true” /> Here, <yourApp> is the name of, … Read more