You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Caldarale, Charles R" <Ch...@unisys.com> on 2008/01/10 01:59:27 UTC

RE: web.xml configured correctly, but still getting'404...resourcenot found'

> From: cuco2772 [mailto:poaa27@gmail.com] 
> Subject: RE: web.xml configured correctly, but still 
> getting'404...resourcenot found'
> 
> This context.xml was the one in conf.

That explains why you had problems.  The one in conf contains attributes
to be shared by *all* webapps; under no circumstances should it ever
contain any app-specific settings.

The other context.xml files define Tomcat-specific attributes for each
associated webapp that are needed for proper treatment of the webapp but
are not described in the servlet spec.  Each container handles this a
bit differently.

Once upon a time, <Context> elements had to be in server.xml, which
required restarting Tomcat if anything needed changing.  For the past
few years, Tomcat has made it possible to place <Context> elements in
webapp-specific locations, allowing changes with only a restart of the
particular webapp, not the whole container.  Consequently, the path and
docBase attributes are no longer appropriate in most instances.

The <Context> doc is here:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: web.xml configured correctly, but stillgetting'404...resourcenot found'

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: cuco2772 [mailto:poaa27@gmail.com] 
> Subject: RE: web.xml configured correctly, but 
> stillgetting'404...resourcenot found'
> 
> if you want Tomcat to behave a certain way for a particular 
> webapp, you could edit context.xml files to get something
> different from the default behaviour.

Something in addition might be a better way of phrasing it.  Any webapp
can have its own context.xml file, but most don't need one.  If you look
at the attributes described here:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
you'll see numerous factors that you might want to be different for
different webapps (e.g., cookies, cross-context, privileged,
cacheMaxSize).  Note that if a webapp is deployed in a location other
than under the <Host> appBase directory, you must have a <Context>
element for it in conf/Catalina/[hostName]/[appName].xml that contains a
docBase attribute pointing to the location of the webapp; that's the
only situation where docBase should be used.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: web.xml configured correctly, but still getting'404...resourcenot found'

Posted by cuco2772 <po...@gmail.com>.
Thanks a lot, Chuck. So I think I can infer from what youre saying is that
for the other 2 context.xml's,
if you want Tomcat to behave a certain way for a particular webapp, you
could edit context.xml files
to get something different from the default behaviour. In what type of
situation might you want to do
something like that, I mean what kind of situation would compel you to want
to edit one of those
context.xmls ?  Anyway, thanks a bunch for the help. This is the most
helpful forum I'v been on.
You guys rock !

    -adam  


Caldarale, Charles R wrote:
> 
>> From: cuco2772 [mailto:poaa27@gmail.com] 
>> Subject: RE: web.xml configured correctly, but still 
>> getting'404...resourcenot found'
>> 
>> This context.xml was the one in conf.
> 
> That explains why you had problems.  The one in conf contains attributes
> to be shared by *all* webapps; under no circumstances should it ever
> contain any app-specific settings.
> 
> The other context.xml files define Tomcat-specific attributes for each
> associated webapp that are needed for proper treatment of the webapp but
> are not described in the servlet spec.  Each container handles this a
> bit differently.
> 
> Once upon a time, <Context> elements had to be in server.xml, which
> required restarting Tomcat if anything needed changing.  For the past
> few years, Tomcat has made it possible to place <Context> elements in
> webapp-specific locations, allowing changes with only a restart of the
> particular webapp, not the whole container.  Consequently, the path and
> docBase attributes are no longer appropriate in most instances.
> 
> The <Context> doc is here:
> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/web.xml-configured-correctly%2C-but-still-getting-%27404...resource--not-found%27-tp14717184p14746833.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org