You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Amir Nuri <am...@mobilitec.com> on 2001/04/01 18:48:39 UTC

Web.xml Question

Hi
I have two tomcat instances , each one of them has it's own server.xml file
and it's context.
My directory structure is webapps	->App1->WEB-INF->web.xml
						->App2->WEB-INF->web.xml
Tomcat#1 has App1 context and Tomcat#2 has App2 context (defined in
server1.xml and server2.xml)
On my web.xml files i have load-on-startup directive.
My Problem is that i expexted that each tomcat will activate its own web.xml
file ( in it's WEB-INF directory of the context)

But every tomcat uses both web.xml files !!!!????
The indication of the problem is that both tomcat's instances try to load on
startup all the servlets defined in the web.xml files.

Tomcat version 3.2.1
Apache version 1.3.14 (Unix) mod_jk



Tomcat - SSL + gzip?

Posted by Lance Dyas <la...@inetnebr.com>.
SSL... and a servlet on Tomcat, what version is required and how does
one set it up?


Re: Web.xml Question

Posted by Ed Gomolka <eg...@gyldan.com>.
Oops. I meant "comment out" in my last post, rather than "uncomment".
Sorry about that.

Ed
On Sunday 01 April 2001 15:38, Ed Gomolka wrote:
> On Sunday 01 April 2001 11:48, Amir Nuri wrote:
> > Hi
> > I have two tomcat instances , each one of them has it's own server.xml
> > file and it's context.
> > My directory structure is webapps	->App1->WEB-INF->web.xml
> > 						->App2->WEB-INF->web.xml
> > Tomcat#1 has App1 context and Tomcat#2 has App2 context (defined in
> > server1.xml and server2.xml)
> > On my web.xml files i have load-on-startup directive.
> > My Problem is that i expexted that each tomcat will activate its own
> > web.xml file ( in it's WEB-INF directory of the context)
> >
> > But every tomcat uses both web.xml files !!!!????
> > The indication of the problem is that both tomcat's instances try to load
> > on startup all the servlets defined in the web.xml files.
> >
> > Tomcat version 3.2.1
> > Apache version 1.3.14 (Unix) mod_jk
>
> If both Tomcat instances use the same webapps directory, each
> Tomcat instance will try to load all of the webapps within the webapps
> directory, regardless of whether a particular webapp is identified in the
> server.xml file.
> I believe that if you don't want to automatically pick up everything in the
> webapps directory, you will need to uncomment the following line in your
> server.xml file:
> <ContextInterceptor className="org.apache.tomcat.context.AutoSetup" />

-- 

Ed Gomolka
(egomolka@gyldan.com)

Re: Web.xml Question

Posted by Ed Gomolka <eg...@gyldan.com>.
On Sunday 01 April 2001 11:48, Amir Nuri wrote:
> Hi
> I have two tomcat instances , each one of them has it's own server.xml file
> and it's context.
> My directory structure is webapps	->App1->WEB-INF->web.xml
> 						->App2->WEB-INF->web.xml
> Tomcat#1 has App1 context and Tomcat#2 has App2 context (defined in
> server1.xml and server2.xml)
> On my web.xml files i have load-on-startup directive.
> My Problem is that i expexted that each tomcat will activate its own
> web.xml file ( in it's WEB-INF directory of the context)
>
> But every tomcat uses both web.xml files !!!!????
> The indication of the problem is that both tomcat's instances try to load
> on startup all the servlets defined in the web.xml files.
>
> Tomcat version 3.2.1
> Apache version 1.3.14 (Unix) mod_jk

If both Tomcat instances use the same webapps directory, each 
Tomcat instance will try to load all of the webapps within the webapps
directory, regardless of whether a particular webapp is identified in the 
server.xml file.
I believe that if you don't want to automatically pick up everything in the 
webapps directory, you will need to uncomment the following line in your
server.xml file:
<ContextInterceptor className="org.apache.tomcat.context.AutoSetup" />


-- 

Ed Gomolka
(egomolka@gyldan.com)