Package org.apache.isis.viewer.html.context

Examples of org.apache.isis.viewer.html.context.Context


        }

        // authenticated
        authenticationSessionStrategy.bind(request, response, authSession);

        final Context context = new Context(getHtmlComponentFactory());
        context.setSession(authSession);
        authSession.setAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY, context);

        LOG.info("created session");
        redirectToStartPage(response, user);
    }
View Full Code Here


            throw new ServletException("No action specified");
        } else if (!controller.actionExists(req)) {
            throw new ServletException("No such action " + req.getRequestType());
        } else {
            try {
                final Context context = getContextForRequest(request);
                processRequest(request, response, req, context);
            } catch (final Exception e) {
                LOG.error("exception during request handling", e);
                throw new ServletException("Internal exception", e);
            }
View Full Code Here

        }
    }

    private Context getContextForRequest(final HttpServletRequest request) {
        final AuthenticationSession authSession = getAuthenticationSession();
        Context context = (Context) authSession.getAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY);
        if (context == null || !context.isValid()) {
            context = new Context(getHtmlComponentFactory());
            authSession.setAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY, context);
        }
        return context;
    }
View Full Code Here

        }

        // authenticated
        authenticationSessionStrategy.bind(request, response, authSession);

        final Context context = new Context(getHtmlComponentFactory());
        context.setSession(authSession);
        authSession.setAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY, context);

        LOG.info("created session");
        redirectToStartPage(response, user);
    }
View Full Code Here

            throw new ServletException("No action specified");
        } else if (!controller.actionExists(req)) {
            throw new ServletException("No such action " + req.getRequestType());
        } else {
            try {
                final Context context = getContextForRequest(request);
                processRequest(request, response, req, context);
            } catch (final Exception e) {
                LOG.error("exception during request handling", e);
                throw new ServletException("Internal exception", e);
            }
View Full Code Here

        }
    }

    private Context getContextForRequest(final HttpServletRequest request) {
        final AuthenticationSession authenticationSession = getAuthenticationSession();
        Context context = (Context) authenticationSession.getAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY);
        if (context == null || !context.isValid()) {
            // TODO reuse the component factory
            context = new Context(getNewHtmlComponentFactory());
            authenticationSession.setAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY, context);
        }
        return context;
    }
View Full Code Here

        }

        final HttpSession httpSession = request.getSession(true);
        httpSession.setAttribute(WebAppConstants.HTTP_SESSION_AUTHENTICATION_SESSION_KEY, authSession);

        final Context context = new Context(new HtmlComponentFactory());
        context.setSession(authSession);
        authSession.setAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY, context);

        LOG.info("created session: " + httpSession);
        loggedIn(response, user);
    }
View Full Code Here

            throw new ServletException("No action specified");
        } else if (!controller.actionExists(req)) {
            throw new ServletException("No such action " + req.getRequestType());
        } else {
            try {
                final Context context = getContextForRequest(request);
                processRequest(request, response, req, context);
            } catch (final Exception e) {
                LOG.error("exception during request handling", e);
                throw new ServletException("Internal exception", e);
            }
View Full Code Here

        }
    }

    private Context getContextForRequest(final HttpServletRequest request) {
        final AuthenticationSession authenticationSession = getAuthenticationSession();
        Context context =
            (Context) authenticationSession.getAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY);
        if (context == null || !context.isValid()) {
            // TODO reuse the component factory
            context = new Context(new HtmlComponentFactory());
            authenticationSession.setAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY, context);
        }
        return context;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.html.context.Context

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.