tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rum Pel" <rum_...@hotmail.com>
Subject Re: 404 Not found - howto
Date Tue, 20 Aug 2002 08:29:32 GMT



>From: "Craig R. McClanahan" <craigmcc@apache.org>
>
>On Fri, 16 Aug 2002, Rum Pel wrote:
>
> > Date: Fri, 16 Aug 2002 05:05:47 -0400
> > From: Rum Pel <rum_pel@hotmail.com>
> > Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> > To: tomcat-user@jakarta.apache.org
> > Subject: 404 Not found - howto
> >
> >
> > Can a servlet produce a "404 Page Not found" error? It seems to me
> > that it is the webserver/appserver that should do this, but I want
> > it in the context of outputting static content via a servlet:
> > http://localhost:8080/webapp/wsdl?ws=name
> > should give a 404 error in case ws=name is not found.
> >
>
>   response.sendError(HttpServletResponse.SC_NOT_FOUND,
>                     "your error message goes here");


I tried this. What I got in the browser was a neatly laid out page
showing the error in Tomcat's description format. What I am not sure
is if Tomcat also returns 404 in the http response, and the error
description is part of the HTTP's 404 code. For example, when I give
the url: http://www.stanford.edu/se.html, the page I get is, I think,
IE's local page, and not the one sent by stanford's webserver.

So what I want to know, in addition to sending out "I ate your page"
html, does the webserver also send out 404 in the HTTP response?
The reason I am asking is becoz I working in the context of automated
clients, which only understands HTTP's response but not interpret text.

Thanks in advance,
--rp

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message