wood burning stoves*
The moose likes Tomcat and the fly likes Dynamically Configure Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Dynamically Configure Tomcat" Watch "Dynamically Configure Tomcat" New topic
Author

Dynamically Configure Tomcat

Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
Is there a mechanism to dynamically configuring Tomcat? Specifically, I am interested in being able to dynamically change the subdomains and servlet mappings Tomcat would respond to. I've been looking thru the Tomcat API and, while it appears this might to be possible, I have been unable to find any real code examples. If it is possible, can someone point me to some code examples or at least in the right direction?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Using the Management app you can undeploy an application, change the web.xml (with a text editor or whatever), and redeploy it to use the new values.

Bill
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You might also want to look at the Administrator application.
It doesn't ship with the more recent versions and I'm not sure if it's even supported any more but I know it does allow you to create, and configure things like data sources, and users while Tomcat is running.

The source to this application might get you off to a good start.

You can download the Administrator application for Tomcat 5.5 from here:
http://tomcat.apache.org/download-55.cgi
[ June 28, 2008: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dynamically Configure Tomcat
 
Similar Threads
How to design a jsf page dynamically with input text,radio button etc
How to Launch a JNLP File from JSP Page
jsp pages not executing
how to call jsp to servlets
changing themes dynamically for jsps using struts and css