> From: Felix Schumacher [mailto:[EMAIL PROTECTED] 
> Subject: Re: Problem with JNDI using a changed context root path
> 
> Remember to move the corresponding context file as well, so move
> conf/Catalina/localhost/mywebapp.xml to
> conf/Catalina/localhost/ROOT.xml.

The above .xml file is not always created; regardless, it should be
deleted, not just renamed, since it likely contains invalid attributes
from the previous deployment.

> > My context.xml in the META-INF:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <Context path="/" docBase="warfilename" reloadable="true" >

You must remove both the path and docBase attributes - neither are
allowed and they are possibly messing up Tomcat's internal structures
during deployment.  As Felix noted, rename your .war file to ROOT.war
(and remove Tomcat's default ROOT directory) in order to make it the
default webapp.

> >   <Resource name="jdbc/warfilename" type="javax.sql.DataSource"

It's probably inappropriate to use the "warfilename" as part of JNDI
lookup, since the name of the .war file (and therefore the webapp) is
subject to change; use a fixed value, both there and in the code doing
the lookup.

> > My context tag in the server.xml:
> > <Context path="/"
> >          docBase="warfilename"
> >          reloadable="true" />

You must not have the <Context> defined twice; I think the one in
server.xml will be overridden by the one in META-INF/context.xml, but
you should not count on it.  For that matter, you should never place
<Context> elements in server.xml in modern versions of Tomcat.  If you
absolutely insist on putting your <Context> in server.xml, the path for
the default app is an empty string "", not a slash.  Read the doc:
http://tomcat.apache.org/tomcat-5.5-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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to