tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: can't call my servlet on Tomcat 6 (Error 404)
Date Mon, 01 Feb 2010 02:39:17 GMT
> From: hbral [mailto:nrolle@web.de]
> Subject: RE: can't call my servlet on Tomcat 6 (Error 404)
> 
> i call: /download/file
> and i get the 404 error

What's the entire URL?

Enable the AccessLogValve in server.xml and see if the request is even getting to Tomcat.

> do you mean the tomcat server.xml?

Indeed, and it looks o.k.
 
>     <Connector port="8080" protocol="HTTP/1.1"
>                connectionTimeout="20000"
>                redirectPort="8443" />
>     <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

Do you have Tomcat front-ended by httpd or some other server?  If so, you'll need to configure
it to pass the desired requests to Tomcat.  If not, you'll need to use port 8080 on your URL.

> war file: download.war
> path: apache-tomcat-6.0.24\webapps\download

So Tomcat has expanded the download.war file into the download directory?  (It should; just
checking.)

> web.xml:
>   <servlet-mapping>
>     <servlet-name>DLServlet</servlet-name>
>     <url-pattern>/download/file</url-pattern>
>   </servlet-mapping>

Change the <url-pattern> to just /file; the webapp name must not be part of the pattern.

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


Mime
View raw message