Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 39677 invoked from network); 4 May 2005 15:32:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 May 2005 15:32:15 -0000 Received: (qmail 4530 invoked by uid 500); 4 May 2005 15:33:41 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 4505 invoked by uid 500); 4 May 2005 15:33:39 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 4489 invoked by uid 99); 4 May 2005 15:33:38 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_50_60,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from albatross.ericsson.se (HELO albatross.ericsson.se) (193.180.251.49) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 04 May 2005 08:33:38 -0700 Received: from esealmw127.eemea.ericsson.se ([153.88.254.122]) by albatross.ericsson.se (8.12.10/8.12.10/WIREfire-1.8b) with ESMTP id j44FVUfq021522 for ; Wed, 4 May 2005 17:31:30 +0200 (MEST) Received: from esealmw127.eemea.ericsson.se ([153.88.254.175]) by esealmw127.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.211); Wed, 4 May 2005 17:31:29 +0200 Received: from esealmw114.eemea.ericsson.se ([153.88.200.5]) by esealmw127.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.211); Wed, 4 May 2005 17:31:29 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C550BE.5749CEF6" Subject: Creating and deploying a StandardContex from a Servlet Date: Wed, 4 May 2005 17:31:28 +0200 Message-ID: <1DA0626BEB4BCF4699FD33B78532C0A91DC07D@esealmw114.eemea.ericsson.se> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Creating and deploying a StandardContex from a Servlet Thread-Index: AcVQvlbgYMsa/35nRki1EW9ugsonSw== From: "Erik Hellman \(KA/EAB\)" To: X-OriginalArrivalTime: 04 May 2005 15:31:29.0127 (UTC) FILETIME=[5775BF70:01C550BE] X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C550BE.5749CEF6 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, =20 I've tried asking this question on the tomcat-user list with no success. = Since it is related to the Tomcat API I hope someone here could give me = some tips. =20 What I basically need to do is to create a customized manager = webapplication. It will display all loaded webapplication where the = names have a specific prefix. Also, it will be able to undeploy all of = these webapps and then deploy all webapps from a specific path.=20 =20 I have a Servlet implementing ContainerServlet. Using this I've manage = to retrieve all webapps from the current Host (myHost.findChildren()). = I've also manage to create StandardContext instances, set the properties = I thought were necessary and added them to the Host (myHost.addChild()). = This doesn't work very well however, since the new webapps seem to be = deployed but cannot start. Neither is it possible to remove them through = the Manager webapp. =20 So my question is; what is the proper way for creating a new = StandardContext, setting the right properties, deploy and start it? = Right now I'm doing the following: =20 --- theContext =3D new StandardContext(); theContext.setDisplayName(thePath); theContext.setDocBase(myBaseDir + thePath); theContext.setName(thePath); theContext.setPath(thePath); myHost.addChild(theContext); theContext.start(); --- =20 I know this list is for development of Tomcat, but I guess this question = is close enough. :) =20 regards, Erik ------_=_NextPart_001_01C550BE.5749CEF6--