tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Hvid <>
Subject "Persistent attributes"
Date Fri, 27 Jun 2003 18:34:26 GMT
Hello list.

I have tried posting this question to but I didn't get 
the answer that I needed:

I am writing a web application that stores its data in an XML-file. I 
am deploying it via Apache Tomcat. I would like to make it easy to 
deploy. For it to work the user deploying my application has to set the 
file name of the data storage.

I can think of two approaches:

1. The application provides the user interface: My application has a 
setup page and if it is the first time it is run it will ask the user 
the file name of the data storage.

To implement this I need to make a string persistent. Does Apache 
Tomcat provide a way to make data persistent accross stop/starts? I 
have tried setAttribute in ServletContext but the attributes disappear 
when the application is reloaded.

2. The servlet container provides the user interface: I find the Tomcat 
web interface slightly clumsy but there is something called environment 
entries in the administration tool. How do I read these environment 
entries in my application?

Alternatively: Is there a way to set the init parameters (that are read 
via ServletConfig) from within Apache Tomcat's web interface?

Any help appreciated.

-- Christian

PS: If you are interested - I am making a Wiki and it is available 
including source here:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message