Interview Questions

Difference between response.sendError() and response.setStatus() ?

response.sendError(int) will look for a matching error code(if configured) in web.xml.

response.setStatus(int) will still expect the user to send the response even though the error code is set.