Skip to Content

Tomcat and System properties

Let’s say you distribute a web application with jakarta-tomcat. Ever wonder how to let your customers change the TCP port tomcat is running on without having them open jakarta-tomcat/conf/server.xml and mess around with XML? Funkman’s Weblog gives us a solution. Use System properties to configure dynamically this port (as well as other ports) from the command line with the -D switch. You could also use ant to read a plain text .properties file customers are used to and pass the parameters on the tomcat’s command line.

What isn’t said in the weblog is that it doesn’t seem to work with tomcat 4.0. Sad…

comments powered by Disqus