Tomcat – Setting Java System Properties for webapps

If you need to set the Java System Properties for the webapps in Tomcat, your need to declare it in the $CATALINA_OPTS.

Example: if i want to change the user.home property to /home/new_home

export CATALINA_OPTS=-Duser.home=/home/new_home

Restart the Tomcat to apply the new change.

Please note that this change applies to all webapps in Tomcat. There is no way to set Java System Properties differently in each webapp.

Done =)

2 thoughts on “Tomcat – Setting Java System Properties for webapps”

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.