server 6.1: setting status 500 in response from a J2EE webapp?
For a number of reasons, we would like some error JSPs for our J2EE webapps to set the HTTP status code to 500 (Server Error), including when we forward() requests to the error pages (not just when they're servicing requests that generated uncaught Exceptions).
I cannot tell how to do that with Web Server 6.1 -- if I simply use setStatus() in the JSP, WS 6.1 will replace the body of the response generated by the JSP with the error page defined for the web server. Experimenting with disabling error-j2ee or using a custom "null" SAF was even worse -- WS 6.1 would send an empty document along with the status 500 response headers.
Strangely, if the webapp throws an exception and has an error-page defined in web.xml, the response from WS 6.1 will include the body from the JSP along with an HTTP status code of 500.
How can we make sure that the web server will send a response code of 500 and the JSP/webapp-generated response (body, headers, etc.) when requests are handled by our error JSPs?
Thanks,
Peter

