This is the solution I ended up using--but shouldn't setting <host autoDeploy="false"> 
keep Tomcat from creating a context for
web-apps in the AppBase?

Is this a bug in 4.1.7 that autoDeploy="false" seems not to effect this behavior?

Thanks,

Jeff

----- Original Message -----
From: "Rui Fernandes" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, September 11, 2002 2:12 AM
Subject: RE: Servlet's loading twice on start-up--DRIVING ME NUTS!


> I got this problem this is the solution that someone told me.
>
> ----- Original Message -----
> From: Cox, Charlie <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Sent: Friday, August 30, 2002 3:18 PM
> Subject: RE: Servlet Instances
>
>
> > any webapp whose physical location is a subdirecty of the 'appBase'
> setting
> > in your server.xml(default is 'webapps') will be loaded as a context
> > automatically by tomcat.
> >
> > take this example:
> > you have a context defined in /tomcat/webapps/aaa
> >
> > the default 'appbase' is webapps. So aaa would automatically be loaded by
> > tomcat even if you didn't define a <context> for it in server.xml.
> > this way you can access it as www.myhost.com/aaa
> >
> > now if you defined a <context> such that www.myhost.com/bbb is using the
> > context aaa, then you now have two ways to access your context, each
> loaded
> > separately.
> >
> > to disable the automatic loading, change your appbase to an empty
> > directory(i.e. "/tomcat/webapps/dummy")
> >
> > Charlie
>
> ----- Original Message -----
> From: Peter Lin <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Sent: Wednesday, September 11, 2002 4:38 AM
> Subject: Re: Servlet's loading twice on start-up--DRIVING ME NUTS!
>
>
> >
> >
> > I actually wrote a short document describing this docroot configuration
> problem and submitted it to tomcat-dev, but it didn't get any response from
> the developers.  unfortunately, they are all very busy.  I'm willing to
> revise the initial draft I wrote to include this kind of information if one
> of the developers is willing to sign off/speak up for it.
> >
> > peter lin
> >
> >  Jeff Wishnie wrote:I have a very simple Tomcat install with one
> application. The web.xml for
> > the applicaiton loads two servlets on start-up.
> >
> > According to my logs both servlets have their init() methods called
> _twice_.
> >
> > I've looked through the list archives and gone through the mentionned
> causes
> > of this problem and, assuming I understand the issues, have ruled them
> out.
> >
> > 1. The servlets are _not_ throwing exceptions
> >
> > 2. I have only _one_ context defined in server.xml and it is _not_ the
> > default context.
> >
> > I'm going nuts here and would be very grateful for any help folks on the
> > list can provide.
> >
> > Here are the details of my set-up:
> >
> > Tomcat: 4.1.7-LE
> > JDK: 1.4.0_01
> > OS: Redhat 7.2
> >
> > Tomcat layout:
> >
> > One web application in: $TOMCAT_HOME/ROOT/MyApp
> >
> > Here are revelant sections from $TOMCAT_HOME/conf/server.xml:
> >
> > autoDeploy="false">
> > directory="logs" prefix="localhost_log." suffix=".txt"
> > timestamp="true"/>
> > reloadable="false" />
> >
> >
> > [note that "autoDeploy" and "reloadable" are false and that the Context
> > path="/", _not_ ""]
> >
> > Here are relevent sections from $TOMCAT_HOME/ROOT/MyApp/WEB-INF/web,xml:
> >
> >
> > initServlet
> > com.foo.InitServlet
> > 10
> >
> >
> >
> > serviceInit
> > com.foo.ServiceInitServlet
> >
> >
> > endpoint
> >
> >
> > http://foo.com/service/bar?wsdl
> >
> >
> > 20
> >
> >
> > Why is Init getting called TWICE for each servlet??
> >
> > Help!
> >
> > Thanks!
> >
> > - Jeff
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> >
> > ---------------------------------
> > Yahoo! - We Remember
> > 9-11: A tribute to the more than 3,000 lives lost
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to