tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Len Popp" <len.p...@gmail.com>
Subject Re: Setting SC_INTERNAL_SERVER_ERROR in http servlet response
Date Thu, 06 Sep 2007 05:52:49 GMT
When a web server returns an error status, it's supposed to include an
HTML page with an error message. The one you're seeing is Tomcat's
default error page. You can customize the error page by putting an
<error-page> declaration in your application's web.xml file.
-- 
Len

On 9/6/07, ying lcs <yinglcs@gmail.com> wrote:
> Hi,
>
> In my servlet, I set the response code to 500, like this:
>
> response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
>
>
> Why tomcat attached this in my http response? And how can I disable it?
>
> Thank you.
>
> <html><head><title>Apache Tomcat/4.1.36 - Error
> report</title><STYLE><!--H1{font-family :
> sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;}
> H3{font-family : sans-serif,Arial,Tahoma;color :
> white;background-color : #0086b2;} BODY{font-family :
> sans-serif,Arial,Tahoma;color : black;background-color : white;}
> B{color : white;background-color : #0086b2;} HR{color : #0086b2;}
> --></STYLE> </head><body><h1>HTTP Status 500 - </h1><HR
size="1"
> noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b>
> <u></u></p><p><b>description</b> <u>The server
encountered an internal
> error () that prevented it from fulfilling this request.</u></p><HR
> size="1" noshade="noshade"><h3>Apache Tomcat/4.1.36</h3></body></html>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message