I am trying to generate a custom error and then send it to the Error.jsp page but I am having a problem. Here is what I have done:
I have created a very basic exception class.
package lampoonslodge;
public class SessionException extends Exception {
public SessionException(){
super("Session or page has expired");
}
}
/************************************************************/
I then have a
jsp with the following line of code-
if(true)
throw (new SessionException());
/**************************************************************/
In my web.xml file I have the following syntax
<error-page>
<exception-type>lampoonslodge.SessionException</exception-type>
<location>/Error.jsp</location>
</error-page>
/**************************************************************/
So why does it not work
When the code executes int the jsp it does display my error message but under a 500 error heading. It does not go to error page.
Could someone please help me with this one.
Thank you ver much david