Difference between sendError and setStatus methods...
Narasimha Rao B.
posted 11 years ago
Hi, A RuntimeException is thrown and it was caught appropriately in the JSP. Now if the developer sets the status code of 5XX using setStatus method, i.e setStatus(550) and also calls the sendError() method on HttpServletRespons, Will it be any problem? What the user sees in the browser? I am sure it is not the proper way to do and it is given clearly in specs that, in case of errors don't set the status code call sendError method and set the status code in the case of normal execution.