tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Fohrer <Torsten.Foh...@dcsi.de>
Subject POSSIBLE BUG, in ErrorReportValve or HttpServletResponse implemen tation
Date Fri, 12 Apr 2002 07:12:07 GMT

We have installed Apache 2 and Tomcat 4 for Performance/stabletests on some
machines, 
when we request some pages that not exists, some browser the plain html
source code of the
error page from tomcat (konqueror 2-3, netscape 4, and so on...). I think at
first i can be the
mod_jk module, but tomcat alone have this too.

I have break down the error to ErrorReportValve in Line 353, where the
content-type of then response are set. Possible the content-type isn't set,
can be set but no exception is thrown,
i have insert a System.out and no one is thrown.

SOURCE CODE:

            Writer writer = response.getReporter();
            if (writer != null) {

                try {
             >>       hres.setContentType("text/html"); // Possible this
setting isn't applied?
                } catch (Throwable t) {
                    if (debug >= 1)
                        log("status.setContentType", t);
                }

                // If writer is null, it's an indication that the response
has
                // been hard committed already
                writer.write(sb.toString());
                writer.flush();

            }



When i try it with telnet localhost 8080, i get this reponse:

GET /index2.jsp HTTP/1.0
Accept: text/*, */*

HTTP/1.1 404 /index2.jsp
Connection: close
Date: Fri, 12 Apr 2002 09:03:28 GMT
Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)

<html><head><title>Apache Tomcat/4.0.1 - Error
report</title><STYLE><!--H1{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>Apache Tomcat/4.0.1 - HTTP Status 404 - /index2.jsp</h1><HR
size="1" noshade><p><b>type</b> Status report</p><p><b>message</b>
<u>/index2.jsp</u></p><p><b>description</b> <u>The
requested resource
(/index2.jsp) is not available.</u></p><HR size="1"
noshade></body></html>Connection closed by foreign host.

Thanks for help...


Torsten Fohrer

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


Mime
View raw message