B
bearsfoot
Hi,
I hope this is the correct group.
How should a HttpServlet include custom errors in in AJAX response.
I need to be able to control some client side behaviour based on the
error returned.
I have tried using cuctom status codes in the
HttpServletResponse.setStatus() and sendError() methods but I always
receieve a Status 500 such as in response below.
If an exception is thrown by the servlet a Status 500 is also
returned.
Thanks in advance.
===========================================
responseText = Error 500: null ErrorMessage
Error 500: Server caught unhandled exception from servlet
[testServlet]: ERROR: Cannot set header. Response
already committed.
responseXML.xml =
status = 500
statusText = Internal Server Error
=============================================
I hope this is the correct group.
How should a HttpServlet include custom errors in in AJAX response.
I need to be able to control some client side behaviour based on the
error returned.
I have tried using cuctom status codes in the
HttpServletResponse.setStatus() and sendError() methods but I always
receieve a Status 500 such as in response below.
If an exception is thrown by the servlet a Status 500 is also
returned.
Thanks in advance.
===========================================
responseText = Error 500: null ErrorMessage
Error 500: Server caught unhandled exception from servlet
[testServlet]: ERROR: Cannot set header. Response
already committed.
responseXML.xml =
status = 500
statusText = Internal Server Error
=============================================