On Thu, 27 Mar 2003, Jeff Tulley wrote:
> Date: Thu, 27 Mar 2003 16:46:01 -0700 > From: Jeff Tulley <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Making an application disabled at startup > > I'm looking for a way to have an application in the webapps directory, > but stopped by default when Tomcat starts up. I see in the code > (o.a.c.core.StandardContext.java) the "setAvailable" method, which > should correspond to an XML attribute 'available="true"'. Setting > this > has no effect. > > Is this supposed to work this way, or is there another built-in way to > achieve the same results? > > It would be ideal if the user could enable these applications through > built-in mechanisms like Tomcat's Manager HTML interface. > The startup logic (in org.apache.catalina.startup.ContextConfig) overrides whatever available setting you configure, by setting it to true if all the setup stuff succeeded and false if something failed (say, because of a parse error on web.xml or a load-on-startup servlet where you couldn't find the actual servlet class). Short of modifying Tomcat, you could probably accomplish this by maintaining a servlet context attribute or something that is initially set to false. Then add a Valve (internal to Tomcat) or a Filter (inside the app) that interrogates this flag and returns a 403 if it is still false. > > > Jeff Tulley ([EMAIL PROTECTED]) > (801)861-5322 > Novell, Inc., The Leading Provider of Net Business Solutions > http://www.novell.com > Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
