Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 9447 invoked from network); 2 Jun 2007 14:59:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jun 2007 14:59:04 -0000 Received: (qmail 97397 invoked by uid 500); 2 Jun 2007 14:59:01 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 97356 invoked by uid 500); 2 Jun 2007 14:59:01 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 97345 invoked by uid 500); 2 Jun 2007 14:59:01 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 97340 invoked by uid 99); 2 Jun 2007 14:59:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Jun 2007 07:59:01 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Jun 2007 07:58:56 -0700 Received: by brutus.apache.org (Postfix, from userid 33) id 268AA71419D; Sat, 2 Jun 2007 07:58:35 -0700 (PDT) From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 42409] - Extra response headers not sent when using custom error page In-Reply-To: X-Bugzilla-Reason: AssignedTo Message-Id: <20070602145836.268AA71419D@brutus.apache.org> Date: Sat, 2 Jun 2007 07:58:35 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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