Hi guys, I have a question about custom error codes and redirection.
The application throws different errors for different situations.
Example: Bad credentials = resp.sendError(3005, "Bad Credentials")
Example: Not Authorized = resp.sendError(3007, "Not Authorized");
When these errors get thrown, I get to the default error page with the HTTP Status code on top. My question is, how do I redirect to a custom jsp error page.
For example, for a 404 error, which is a known error code... in web.xml I just declare
<error-page>
<error-code>404</error-code>
<location>/404error.jsp</location>
</error-page>
but if i do,
<error-page>
<error-code>3005</error-code>
<location>...</location>
</error-page>
It doesn't work. Anyone know how to create an error page for this. When that error is thrown, it should redirect to the custom error jsp page.
Thanks in advance.