show a customized error page upon session timeout

Discussions

EJB design: show a customized error page upon session timeout

  1. show a customized error page upon session timeout (1 messages)

    Hi,
    I want to display a customized page upon session timeout.
    I know ho wto set the session time out ,but after session time its displaying a blank page, instead i want to display a error page .
    Iam using IBM WSAD 5.1/Websphere
    Thanks
    RK
  2. If you are using JSP, then you could use <%@ page errorPage="errorPage.jsp" %>. The error page will be displayed when an un handled error happens. And in the error page you could check Exception or HttpSession object state.
    Also, (this probably I haven’t used before) have a look on <error-page> element in your web.xml, which can be configured to redirect the request to a particular resource (.jsp, .html) in case of any Exception. You can specify HTTP status code or a fully-qualified class name of an exception in the Error/Exception field.

    -arun