tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 42409] - Extra response headers not sent when using custom error page
Date Sat, 02 Jun 2007 14:58:35 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42409>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42409





------- Additional Comments From hayden.james@gmail.com  2007-06-02 07:58 -------
Ok.  I will tell you what my use case is for this feature.  I'm writing a set of
servlets that handle requests via javascript and the XMLHttpRequest js object. 
In order to differentiate between good requests and bad requests, I either have
the response code set to 200 for success and 400 for failure.  I have separate
handlers for each status number on the javascript end.  As part of the response,
I send data in the header via the "X-JSON" header with a json string as the
value in the header.  The client reads the json parses the json string in both
success responses and error responses (SC_BAD_REQUEST).  The reason im using a
special error page for 400 responses is that the default tomcat page is a lot
more verbose, I want to respond with a very small json string, not a full html page.

The prototype javascript library, (http://www.prototypejs.org) is what
automatically evaluates json for me via the X-JSON response header (in case that
information helps).  Anyway, I think this is a pretty reasonable use case, but
if others disagree, I would at least like to know some other avenues I can take
to get this type of usage with tomcat.  Thanks.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message