tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Baptist <>
Subject Problem with apache response codes
Date Tue, 12 Jun 2001 23:07:21 GMT
I switched an application I was working on from JServ to Jakarta and realized 
there is a change in the way the response codes for the server are being set. 
Apache no longer "recieves" the response code the servlet sets and therefore 
can not do further processing. For context, I am using apache 1.3.12 with 
mod_jserv from the 3.2.2 tomcat release.

Here is the relevant code from the sample servlet

public void doGet(HttpServletRequest req, HttpServletResponse res) {
    res.sendError(503, "blah");

In my httpd.conf file I have the following line

ErrorDocument 503 /foo.html

When running against JServ I get the foo.html file served up and the following 
line in my access.log file:

"GET /servlet/test HTTP/1.1" 503 10189 "-"

When running against Tomcat I get a "standard" tomcat error message (which is 
not what I want) and the following line in the log

"GET /servlet/test HTTP/1.1" 200 129 "-"

My guess is that tomcat is not setting some code in the communication between 
them however I am not familiar enough with the code to track it down.

Any help (or a tomcat patch) would be appreciated


View raw message