Package org.apache.struts2.dispatcher

Examples of org.apache.struts2.dispatcher.SessionMap


    public String intercept(ActionInvocation invocation) throws Exception {

        _log.debug("Authenticating chat user");

        SessionMap session = (SessionMap) ActionContext.getContext().get(ActionContext.SESSION);
        User user = (User) session.get(USER_SESSION_KEY);

        if (user == null) {
            return Action.LOGIN;
        }
        return invocation.invoke();
View Full Code Here


    public String intercept(ActionInvocation invocation) throws Exception {

        LOG.debug("Authenticating chat user");

        SessionMap session = (SessionMap) ActionContext.getContext().get(ActionContext.SESSION);
        User user = (User) session.get(USER_SESSION_KEY);

        if (user == null) {
            return Action.LOGIN;
        }
        return invocation.invoke();
View Full Code Here

    protected void before(ActionInvocation invocation) throws Exception {
        invocation.addPreResultListener(this);
        Map ses = ActionContext.getContext().getSession();
        if (ses == null && autoCreateSession) {
            ses = new SessionMap(ServletActionContext.getRequest());
            ActionContext.getContext().setSession(ses);
        }

        if ( ses != null) {
            lock(ses, invocation);
View Full Code Here

                        "using Struts tags without the associated filter. Struts tags are only usable when the request "+
                        "has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag.");
            }
            Map extraContext = du.createContextMap(new RequestMap(req),
                    req.getParameterMap(),
                    new SessionMap(req),
                    new ApplicationMap(pageContext.getServletContext()),
                    req,
                    res,
                    pageContext.getServletContext());
            extraContext.put(ServletActionContext.PAGE_CONTEXT, pageContext);
View Full Code Here

        mockContainer = new Mock(Container.class);
        Dispatcher du = new Dispatcher(pageContext.getServletContext(), new HashMap());
        du.init();
        Dispatcher.setInstance(du);
        du.setConfigurationManager(configurationManager);
        session = new SessionMap(request);
        Map extraContext = du.createContextMap(new RequestMap(request),
                request.getParameterMap(),
                session,
                new ApplicationMap(pageContext.getServletContext()),
                request,
View Full Code Here

    protected void before(ActionInvocation invocation) throws Exception {
        invocation.addPreResultListener(this);
        Map ses = ActionContext.getContext().getSession();
        if (ses == null && autoCreateSession) {
            ses = new SessionMap(ServletActionContext.getRequest());
            ActionContext.getContext().setSession(ses);
        }

        if ( ses != null) {
            lock(ses, invocation);
View Full Code Here

    protected void before(ActionInvocation invocation) throws Exception {
        invocation.addPreResultListener(this);
        Map ses = ActionContext.getContext().getSession();
        if (ses == null && autoCreateSession) {
            ses = new SessionMap(ServletActionContext.getRequest());
            ActionContext.getContext().setSession(ses);
        }

        if ( ses != null) {
            lock(ses, invocation);
View Full Code Here

  public String intercept(ActionInvocation invocation) throws Exception {

    LOG.debug("Authenticating chat user");

    SessionMap session = (SessionMap) ActionContext.getContext().get(ActionContext.SESSION);
    User user = (User) session.get(USER_SESSION_KEY);

    if (user == null) {
      return Action.LOGIN;
    }
    return invocation.invoke();
View Full Code Here

        mockContainer = new Mock(Container.class);
        Dispatcher du = new Dispatcher(pageContext.getServletContext(), new HashMap());
        du.init();
        Dispatcher.setInstance(du);
        du.setConfigurationManager(configurationManager);
        session = new SessionMap(request);
        Map<String, Object> extraContext = du.createContextMap(new RequestMap(request),
                request.getParameterMap(),
                session,
                new ApplicationMap(pageContext.getServletContext()),
                request,
View Full Code Here

            requestParams.putAll(params);
        } else {
            params = requestParams;
        }
        Map requestMap = new RequestMap(req);
        Map session = new SessionMap(req);
        Map application = new ApplicationMap(servletContext);
        Dispatcher du = Dispatcher.getInstance();
        HashMap<String, Object> ctx = du.createContextMap(requestMap,
                params,
                session,
View Full Code Here

TOP

Related Classes of org.apache.struts2.dispatcher.SessionMap

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.