You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by John Langan <la...@homes.com> on 2006/11/06 20:06:49 UTC

Webapp runs on Tomcat 5.5.9 but not 5.5.20

Webapp runs on Tomcat 5.5.9 but not 5.5.20

 

I compile my war file using eclipse and it runs no problem on Tomcat 5.5.9
but if I try to run the same war on 5.5.20 then I get the error report

The requested resource (/ProjectName/) is not available.

 

I have tried various things with no luck including editing
C:\apache-tomcat-5.5.20\conf\server.xml,

C:\apache-tomcat-5.5.20\conf\Catalina\localhost\context.xml and

C:\apache-tomcat-5.5.20\conf\Catalina\localhost\ProjectName.xml.

 

I'm really stumped so any suggestions as to why an identical webapp runs on
one version of Tomcat but not a more recent one would be gratefully
received.

I'm using Struts, Windows XP and JDK 1.5.0_09.

 

John.

 


Re: Webapp runs on Tomcat 5.5.9 but not 5.5.20

Posted by John McPeek <sp...@bellsouth.net>.
Hi John,
 Are you running this with WTP in eclipse? I see that Chuck was talking 
about the <Context> tag. WTP puts the <Context> tag in the server.xml 
like days gone by. This may be related to your situation.

John

>>From: John Langan [mailto:langanj@homes.com] 
>>Subject: Webapp runs on Tomcat 5.5.9 but not 5.5.20
>>
>>I have tried various things with no luck including editing
>>C:\apache-tomcat-5.5.20\conf\server.xml,
>>    
>>
>
>You should not be putting <Context> tags in conf/server.xml.
>
>  
>
>>C:\apache-tomcat-5.5.20\conf\Catalina\localhost\context.xml and
>>    
>>
>
>The above file should not exist; if you created it, delete it ASAP.
>
>  
>
>>C:\apache-tomcat-5.5.20\conf\Catalina\localhost\ProjectName.xml.
>>    
>>
>
>This file should contain the <Context> element and attributes for your
>app, if you did not create a META-INF/context.xml within the app.
>(Don't do both.)
>
>What's in the above file?  Anything in the catalina log?
>
> - 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: Webapp runs on Tomcat 5.5.9 but not 5.5.20

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: John Langan [mailto:langanj@homes.com] 
> Subject: Webapp runs on Tomcat 5.5.9 but not 5.5.20
> 
> I have tried various things with no luck including editing
> C:\apache-tomcat-5.5.20\conf\server.xml,

You should not be putting <Context> tags in conf/server.xml.

> C:\apache-tomcat-5.5.20\conf\Catalina\localhost\context.xml and

The above file should not exist; if you created it, delete it ASAP.

> C:\apache-tomcat-5.5.20\conf\Catalina\localhost\ProjectName.xml.

This file should contain the <Context> element and attributes for your
app, if you did not create a META-INF/context.xml within the app.
(Don't do both.)

What's in the above file?  Anything in the catalina log?

 - 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: Webapp runs on Tomcat 5.5.9 but not 5.5.20

Posted by John Langan <la...@homes.com>.
Will do. Thanks for the info.

John.

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Monday, November 06, 2006 4:11 PM
To: Tomcat Users List
Subject: RE: Webapp runs on Tomcat 5.5.9 but not 5.5.20

> From: John Langan [mailto:langanj@homes.com] 
> Subject: RE: Webapp runs on Tomcat 5.5.9 but not 5.5.20
> 
> I have META-INF/context.xml in my app, which contains the following.
> <Context path="AppName" debug="1" reloadable="true">
> 	<!-- Default set of monitored resources -->
> 	<WatchedResource>WEB-INF/web.xml</WatchedResource>
> 	<WatchedResource>META-INF/context.xml</WatchedResource>
> <!--Database info -->
> </Context>

The path attribute should be removed, since its value is derived from
the name of the .war file or directory in which the app is deployed.  To
quote from the doc:

"The value of this field must not be set except when statically defining
a Context in server.xml, as it will be infered [sic] from the filenames
used for either the .xml context file or the docBase."

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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
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: Webapp runs on Tomcat 5.5.9 but not 5.5.20

Posted by Michael Hencin <mi...@edm-concepts.com>.
I looked at the TC 5.0 pages for this, and it does not appear to be the same
for 5.0 (which I use now)

http://tomcat.apache.org/tomcat-5.0-doc/config/context.html says

" 	

The context path of this web application, which is matched against the
beginning of each request URI to select the appropriate web application for
processing. All of the context paths within a particular Host must be
unique. If you specify a context path of an empty string (""), you are
defining the default web application for this Host, which will process all
requests not assigned to other Contexts."

While http://tomcat.apache.org/tomcat-5.5-doc/config/context.html says
" The context path of this web application, which is matched against the
beginning of each request URI to select the appropriate web application for
processing. All of the context paths within a particular Host must be
unique. If you specify a context path of an empty string (""), you are
defining the default web application for this Host, which will process all
requests not assigned to other Contexts. The value of this field must not be
set except when statically defining a Context in server.xml, as it will be
infered from the filenames used for either the .xml context file or the
docBase."

The addition in 5.5 being " The value of this field must not be set except
when statically defining a Context in server.xml, as it will be infered from
the filenames used for either the .xml context file or the docBase.""

Can you not specify a path, docbase, and workdir in the context.xml file for
TC 5.0? I routinely change the name of my war file to install a new instance
used for testing or ad-hoc demos. If I could leave those attributes out in
the context file, it would be a great help. 

Mike

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Monday, November 06, 2006 3:11 PM
To: Tomcat Users List
Subject: RE: Webapp runs on Tomcat 5.5.9 but not 5.5.20

> From: John Langan [mailto:langanj@homes.com] 
> Subject: RE: Webapp runs on Tomcat 5.5.9 but not 5.5.20
> 
> I have META-INF/context.xml in my app, which contains the following.
> <Context path="AppName" debug="1" reloadable="true">
> 	<!-- Default set of monitored resources -->
> 	<WatchedResource>WEB-INF/web.xml</WatchedResource>
> 	<WatchedResource>META-INF/context.xml</WatchedResource>
> <!--Database info -->
> </Context>

The path attribute should be removed, since its value is derived from
the name of the .war file or directory in which the app is deployed.  To
quote from the doc:

"The value of this field must not be set except when statically defining
a Context in server.xml, as it will be infered [sic] from the filenames
used for either the .xml context file or the docBase."

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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
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: Webapp runs on Tomcat 5.5.9 but not 5.5.20

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: John Langan [mailto:langanj@homes.com] 
> Subject: RE: Webapp runs on Tomcat 5.5.9 but not 5.5.20
> 
> I have META-INF/context.xml in my app, which contains the following.
> <Context path="AppName" debug="1" reloadable="true">
> 	<!-- Default set of monitored resources -->
> 	<WatchedResource>WEB-INF/web.xml</WatchedResource>
> 	<WatchedResource>META-INF/context.xml</WatchedResource>
> <!--Database info -->
> </Context>

The path attribute should be removed, since its value is derived from
the name of the .war file or directory in which the app is deployed.  To
quote from the doc:

"The value of this field must not be set except when statically defining
a Context in server.xml, as it will be infered [sic] from the filenames
used for either the .xml context file or the docBase."

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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Webapp runs on Tomcat 5.5.9 but not 5.5.20

Posted by John Langan <la...@homes.com>.
Thanks Larry for the advice, which solved the problem. Thanks also to Chuck
and John for the speedy replies and help.

My web application does display a directory listing in 5.5.9 and so I have
edited conf/web.xml to set listings to true and now  my webapp runs.

I'm using eclipse 3.2 with WTP but there are no <Context> tags in the
server.xml and all the editing I did has been removed.
I have also removed the files
C:\apache-tomcat-5.5.20\conf\Catalina\localhost\context.xml and
C:\apache-tomcat-5.5.20\conf\Catalina\localhost\AppName.xml.

I have META-INF/context.xml in my app, which contains the following.
<Context path="AppName" debug="1" reloadable="true">
	<!-- Default set of monitored resources -->
	<WatchedResource>WEB-INF/web.xml</WatchedResource>
	<WatchedResource>META-INF/context.xml</WatchedResource>
<!--Database info -->
</Context>

Thanks again for the help.

John.


-----Original Message-----
From: Larry Isaacs [mailto:Larry.Isaacs@sas.com] 
Sent: Monday, November 06, 2006 3:00 PM
To: Tomcat Users List
Subject: RE: Webapp runs on Tomcat 5.5.9 but not 5.5.20

Just in case, does your web application display a directory
listing in 5.5.9?  If so, be aware that directory listings
have been turned off in conf/web.xml for 5.5.20 (I forget in
which version this occurred) due to the potential of a DOS
attack if your web application contains lots of files.  Other
URLs that don't request a directory listing should work.

Cheers,
Larry

> -----Original Message-----
> From: John Langan [mailto:langanj@homes.com] 
> Sent: Monday, November 06, 2006 2:07 PM
> To: users@tomcat.apache.org
> Subject: Webapp runs on Tomcat 5.5.9 but not 5.5.20
> 
> Webapp runs on Tomcat 5.5.9 but not 5.5.20
> 
>  
> 
> I compile my war file using eclipse and it runs no problem on 
> Tomcat 5.5.9 but if I try to run the same war on 5.5.20 then 
> I get the error report
> 
> The requested resource (/ProjectName/) is not available.
> 
>  
> 
> I have tried various things with no luck including editing 
> C:\apache-tomcat-5.5.20\conf\server.xml,
> 
> C:\apache-tomcat-5.5.20\conf\Catalina\localhost\context.xml and
> 
> C:\apache-tomcat-5.5.20\conf\Catalina\localhost\ProjectName.xml.
> 
>  
> 
> I'm really stumped so any suggestions as to why an identical 
> webapp runs on one version of Tomcat but not a more recent 
> one would be gratefully received.
> 
> I'm using Struts, Windows XP and JDK 1.5.0_09.
> 
>  
> 
> John.
> 
>  
> 
> 

---------------------------------------------------------------------
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


---------------------------------------------------------------------
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: Webapp runs on Tomcat 5.5.9 but not 5.5.20

Posted by Larry Isaacs <La...@sas.com>.
Just in case, does your web application display a directory
listing in 5.5.9?  If so, be aware that directory listings
have been turned off in conf/web.xml for 5.5.20 (I forget in
which version this occurred) due to the potential of a DOS
attack if your web application contains lots of files.  Other
URLs that don't request a directory listing should work.

Cheers,
Larry

> -----Original Message-----
> From: John Langan [mailto:langanj@homes.com] 
> Sent: Monday, November 06, 2006 2:07 PM
> To: users@tomcat.apache.org
> Subject: Webapp runs on Tomcat 5.5.9 but not 5.5.20
> 
> Webapp runs on Tomcat 5.5.9 but not 5.5.20
> 
>  
> 
> I compile my war file using eclipse and it runs no problem on 
> Tomcat 5.5.9 but if I try to run the same war on 5.5.20 then 
> I get the error report
> 
> The requested resource (/ProjectName/) is not available.
> 
>  
> 
> I have tried various things with no luck including editing 
> C:\apache-tomcat-5.5.20\conf\server.xml,
> 
> C:\apache-tomcat-5.5.20\conf\Catalina\localhost\context.xml and
> 
> C:\apache-tomcat-5.5.20\conf\Catalina\localhost\ProjectName.xml.
> 
>  
> 
> I'm really stumped so any suggestions as to why an identical 
> webapp runs on one version of Tomcat but not a more recent 
> one would be gratefully received.
> 
> I'm using Struts, Windows XP and JDK 1.5.0_09.
> 
>  
> 
> John.
> 
>  
> 
> 

---------------------------------------------------------------------
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