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 Tue, 05 Jun 2007 14:20:21 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 shivahr@gmail.com  2007-06-05 07:20 -------
As hinted in Comment #16, I tried this:

1) In "TestServlet.java" (see
http://issues.apache.org/bugzilla/attachment.cgi?id=20297) modified the doGet()
method as below:
		//response.setHeader("X-BUG", "Value1");
		request.setAttribute("X-BUG", "Value1");
		response.sendError(HttpServletResponse.SC_BAD_REQUEST);

2) Updated "400.jsp" as below:
<html>
<body>
<h3>Custom 400 error page</h3>
<% String value = (String) request.getAttribute("X-BUG");
if(value != null && value.length() > 0) {
	response.setHeader("X-BUG", value);
} %>
</body>
</html>

Does this solve your problem?

-- 
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