Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 89176 invoked from network); 27 Jun 2003 18:34:18 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 27 Jun 2003 18:34:18 -0000 Received: (qmail 9114 invoked by uid 97); 27 Jun 2003 18:36:43 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 9107 invoked from network); 27 Jun 2003 18:36:43 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 27 Jun 2003 18:36:43 -0000 Received: (qmail 87712 invoked by uid 500); 27 Jun 2003 18:34:04 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 87686 invoked from network); 27 Jun 2003 18:34:03 -0000 Received: from mail104.telia.com (194.255.237.153) by daedalus.apache.org with SMTP; 27 Jun 2003 18:34:03 -0000 Received: from acm.org (0xc2ff969e.ejb01.dsl.telianet.dk [194.255.150.158]) by mail104.telia.com (Postfix) with ESMTP id B6CCB28E for ; Fri, 27 Jun 2003 20:34:07 +0200 (MEST) Date: Fri, 27 Jun 2003 20:34:26 +0200 Mime-Version: 1.0 (Apple Message framework v552) Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: "Persistent attributes" From: Christian Hvid To: tomcat-user@jakarta.apache.org Content-Transfer-Encoding: 7bit Message-Id: X-Mailer: Apple Mail (2.552) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello list. I have tried posting this question to comp.lang.java 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: http://vredungmand.dk/programming/orange/index.html --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org