Search in sources :

Example 11 with CompleteRequestException

use of com.iplanet.jato.CompleteRequestException in project OpenAM by OpenRock.

the class VersionServlet method onPageSessionDeserializationException.

@Override
protected void onPageSessionDeserializationException(RequestContext requestContext, ViewBean viewBean, Exception e) throws ServletException, IOException {
    HttpServletRequest httpRequest = (HttpServletRequest) requestContext.getRequest();
    AMViewBeanBase.debug.error("VersionServlet.onUncaughtException", e);
    String redirectUrl = VersionViewBean.getCurrentURL(httpRequest) + "/base/AMInvalidURL";
    requestContext.getResponse().sendRedirect(redirectUrl);
    throw new CompleteRequestException();
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) CompleteRequestException(com.iplanet.jato.CompleteRequestException)

Example 12 with CompleteRequestException

use of com.iplanet.jato.CompleteRequestException in project OpenAM by OpenRock.

the class PWResetServlet method onPageSessionDeserializationException.

@Override
protected void onPageSessionDeserializationException(RequestContext requestContext, ViewBean viewBean, Exception e) throws ServletException, IOException {
    ViewBeanManager viewBeanManager = requestContext.getViewBeanManager();
    ViewBean targetView = viewBeanManager.getViewBean(PWResetInvalidURLViewBean.class);
    targetView.forwardTo(requestContext);
    throw new CompleteRequestException();
}
Also used : CompleteRequestException(com.iplanet.jato.CompleteRequestException) ViewBeanManager(com.iplanet.jato.ViewBeanManager) ViewBean(com.iplanet.jato.view.ViewBean)

Example 13 with CompleteRequestException

use of com.iplanet.jato.CompleteRequestException in project OpenAM by OpenRock.

the class PWResetServlet method onUncaughtException.

/**
     * Forwards to uncaught exception view bean, to respond to uncaught
     * application error messages.
     *
     * @param requestContext  request context
     * @param e Exception that was not handled by the application.
     * @throws ServletException
     * @throws IOException
     */
protected void onUncaughtException(RequestContext requestContext, Exception e) throws ServletException, IOException {
    PWResetModelImpl.debug.error("PWResetServlet.onUncaughtException", e);
    ViewBeanManager viewBeanManager = requestContext.getViewBeanManager();
    ViewBean targetView = viewBeanManager.getViewBean(PWResetUncaughtExceptionViewBean.class);
    targetView.forwardTo(requestContext);
    throw new CompleteRequestException();
}
Also used : CompleteRequestException(com.iplanet.jato.CompleteRequestException) ViewBeanManager(com.iplanet.jato.ViewBeanManager) ViewBean(com.iplanet.jato.view.ViewBean)

Example 14 with CompleteRequestException

use of com.iplanet.jato.CompleteRequestException in project OpenAM by OpenRock.

the class PWResetServlet method onRequestHandlerNotFound.

/**
     * Forwards to invalid URL view bean, in case of an invalid target
     * request handler (page).
     *
     * @param requestContext  request context
     * @param handlerName  name of handler
     * @throws ServletException
     */
protected void onRequestHandlerNotFound(RequestContext requestContext, String handlerName) throws ServletException {
    ViewBeanManager viewBeanManager = requestContext.getViewBeanManager();
    ViewBean targetView = viewBeanManager.getViewBean(PWResetInvalidURLViewBean.class);
    targetView.forwardTo(requestContext);
    throw new CompleteRequestException();
}
Also used : CompleteRequestException(com.iplanet.jato.CompleteRequestException) ViewBeanManager(com.iplanet.jato.ViewBeanManager) ViewBean(com.iplanet.jato.view.ViewBean)

Example 15 with CompleteRequestException

use of com.iplanet.jato.CompleteRequestException in project OpenAM by OpenRock.

the class AuthenticationServletBase method onPageSessionDeserializationException.

@Override
protected void onPageSessionDeserializationException(RequestContext requestContext, ViewBean viewBean, Exception e) throws ServletException, IOException {
    ViewBeanManager viewBeanManager = requestContext.getViewBeanManager();
    AuthExceptionViewBean vb = (AuthExceptionViewBean) viewBeanManager.getViewBean(com.sun.identity.authentication.UI.AuthExceptionViewBean.class);
    if (exDebug.messageEnabled()) {
        exDebug.message("AuthenticationServletBase.onPageSessionDeserializationException:", e);
    }
    vb.forwardTo(requestContext);
    throw new CompleteRequestException();
}
Also used : CompleteRequestException(com.iplanet.jato.CompleteRequestException) ViewBeanManager(com.iplanet.jato.ViewBeanManager)

Aggregations

CompleteRequestException (com.iplanet.jato.CompleteRequestException)17 ViewBeanManager (com.iplanet.jato.ViewBeanManager)10 ViewBean (com.iplanet.jato.view.ViewBean)7 HttpServletRequest (javax.servlet.http.HttpServletRequest)4 IOException (java.io.IOException)2 ServletException (javax.servlet.ServletException)2 SessionID (com.iplanet.dpro.session.SessionID)1 RequestContext (com.iplanet.jato.RequestContext)1 RequestContextImpl (com.iplanet.jato.RequestContextImpl)1 NonSyncStringBuffer (com.iplanet.jato.util.NonSyncStringBuffer)1 SSOException (com.iplanet.sso.SSOException)1 SSOToken (com.iplanet.sso.SSOToken)1 AuthViewBeanBase (com.sun.identity.authentication.UI.AuthViewBeanBase)1 ISLocaleContext (com.sun.identity.common.ISLocaleContext)1 L10NMessageImpl (com.sun.identity.shared.locale.L10NMessageImpl)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 URL (java.net.URL)1 RequestDispatcher (javax.servlet.RequestDispatcher)1 Cookie (javax.servlet.http.Cookie)1 HttpServletResponse (javax.servlet.http.HttpServletResponse)1