In my jsp page some pure java code there i.e, scriptlet. After a long time when refresh it then it is throwing
org.apache.jasper.JasperException: java.lang.NullPointerException
Sometimes not for a long time also it is throwing same Exception. and the JSP page is displaying empty page. So the user have only one option is Logout. So to avoid that and redirect him to one page that is error page. How to do it ?
Form What I get here is, on refresh session values might be getting NULL after a certain period of time and thus resulting in
NullPointerException.Create a JSP page called error page and set
In other JSP pages,
So, It will redirect to this page when any Run time error occurs in your JSP.
Note: This won’t redirect to error page if JSP has compile time error.