i have created a common page for 2 different error code. i want to show different message for different error code. in pagenotfound.jsp how can i find that what error code cause this page to be called ?
posted 12 years ago
Read the "javax.servlet.error.status_code" request attribute in your error page. This should be either 403 or 404.
In the real world, the web servers have pre-defined error pages for the HTTP Status codes between 300-400 and 400-500.