R
reformy
hey
from the HTTPServletResponse.setStatus(int sc) API:
"Sets the status code for this response. This method is used to set the
return status code when there is no error (for example, for the status
codes SC_OK or SC_MOVED_TEMPORARILY). If there is an error, and the
caller wishes to invoke an error-page defined in the web application,
the sendError method should be used instead."
I understand from this, that the following code:
response.setStatus(SC_CONFLICT);
response.getOutputStream().println("<html><body>error</body></html>");
should NOT invoke the error page (i have an error page defined for
409-conflict in my web.xml). But still - i get the error page and not
what i've printed into the output-stream.
why?
thanks
yair
from the HTTPServletResponse.setStatus(int sc) API:
"Sets the status code for this response. This method is used to set the
return status code when there is no error (for example, for the status
codes SC_OK or SC_MOVED_TEMPORARILY). If there is an error, and the
caller wishes to invoke an error-page defined in the web application,
the sendError method should be used instead."
I understand from this, that the following code:
response.setStatus(SC_CONFLICT);
response.getOutputStream().println("<html><body>error</body></html>");
should NOT invoke the error page (i have an error page defined for
409-conflict in my web.xml). But still - i get the error page and not
what i've printed into the output-stream.
why?
thanks
yair