Examples of TomcatCookie


Examples of org.apache.tomcat.util.http.TomcatCookie

        // Creating a new session cookie based on that session
        // If there was no cookie with the current session id, add a cookie to the response
        if ( (session != null) && (getContext() != null)
               && getContext().getCookies()
               && !(isRequestedSessionIdFromCookie() && (session.getIdInternal().equals(getRequestedSessionId()))) ) {
            TomcatCookie cookie = new TomcatCookie(Globals.SESSION_COOKIE_NAME,
                    session.getIdInternal());
            configureSessionCookie(cookie);
            response.addCookieInternal(cookie);
        }
View Full Code Here

Examples of org.apache.tomcat.util.http.TomcatCookie

         Context context = (Context) container_;
         Connector connector = ((Response) response).getConnector();
         if (context.getCookies())
         {
            // set a new session cookie
            TomcatCookie cookie = new TomcatCookie(Globals.SESSION_COOKIE_NAME, sessionId);
            // JBAS-6206. Configure cookie a la o.a.c.connector.Request.configureSessionCookie()
            cookie.setMaxAge(-1);
            if (context.getSessionCookie().getPath() != null)
            {
               cookie.setPath(context.getSessionCookie().getPath());
            }
            else
            {
               String contextPath = context.getEncodedPath();
               if ("".equals(contextPath))
               {
                  contextPath = "/";
               }
               cookie.setPath(contextPath);
            }
            if (context.getSessionCookie().getComment() != null)
            {
               cookie.setComment(context.getSessionCookie().getComment());
            }
            if (context.getSessionCookie().getDomain() != null)
            {
               cookie.setDomain(context.getSessionCookie().getDomain());
            }
            if (context.getSessionCookie().isHttpOnly())
            {
               cookie.setHttpOnly(true);
            }
            if (context.getSessionCookie().isSecure())
            {
               cookie.setSecure(true);
            }
            if (connector.getSecure())
            {
               cookie.setSecure(true);
            }

            if (trace_)
            {
               log_.trace("Setting cookie with session id:" + sessionId + " & name:" + Globals.SESSION_COOKIE_NAME);
View Full Code Here

Examples of org.apache.tomcat.util.http.TomcatCookie

        // Creating a new session cookie based on that session
        // If there was no cookie with the current session id, add a cookie to the response
        if ( (session != null) && (getContext() != null)
               && getContext().getCookies()
               && !(isRequestedSessionIdFromCookie() && (session.getIdInternal().equals(getRequestedSessionId()))) ) {
            TomcatCookie cookie = new TomcatCookie(Globals.SESSION_COOKIE_NAME,
                    session.getIdInternal());
            configureSessionCookie(cookie);
            response.addCookieInternal(cookie);
        }
View Full Code Here

Examples of org.apache.tomcat.util.http.TomcatCookie

           
            // Reply modification

            // - cookie
            if (rules[i].isCookie() && newtest != null) {
                TomcatCookie cookie = new TomcatCookie(rules[i].getCookieName(),
                        rules[i].getCookieResult());
                cookie.setDomain(rules[i].getCookieDomain());
                cookie.setMaxAge(rules[i].getCookieLifetime());
                cookie.setPath(rules[i].getCookiePath());
                cookie.setSecure(rules[i].isCookieSecure());
                cookie.setHttpOnly(rules[i].isCookieHttpOnly());
                response.addCookie(cookie);
            }
            // - env (note: this sets a request attribute)
            if (rules[i].isEnv() && newtest != null) {
                for (int j = 0; j < rules[i].getEnvSize(); j++) {
View Full Code Here

Examples of org.apache.tomcat.util.http.TomcatCookie

        // Creating a new session cookie based on that session
        // If there was no cookie with the current session id, add a cookie to the response
        if ( (session != null) && (getContext() != null)
               && getContext().getCookies()
               && !(isRequestedSessionIdFromCookie() && (session.getIdInternal().equals(getRequestedSessionId()))) ) {
            TomcatCookie cookie = new TomcatCookie(Globals.SESSION_COOKIE_NAME,
                    session.getIdInternal());
            configureSessionCookie(cookie);
            response.addCookieInternal(cookie);
        }
View Full Code Here

Examples of org.apache.tomcat.util.http.TomcatCookie

        // Creating a new session cookie based on that session
        // If there was no cookie with the current session id, add a cookie to the response
        if ( (session != null) && (getContext() != null)
               && getContext().getCookies()
               && !(isRequestedSessionIdFromCookie() && (session.getIdInternal().equals(getRequestedSessionId()))) ) {
            TomcatCookie cookie = new TomcatCookie(Globals.SESSION_COOKIE_NAME,
                    session.getIdInternal());
            configureSessionCookie(cookie);
            response.addCookieInternal(cookie);
        }
View Full Code Here

Examples of org.apache.tomcat.util.http.TomcatCookie

        // Creating a new session cookie based on that session
        // If there was no cookie with the current session id, add a cookie to the response
        if ( (session != null) && (getContext() != null)
               && getContext().getCookies()
               && !(isRequestedSessionIdFromCookie() && (session.getIdInternal().equals(getRequestedSessionId()))) ) {
            TomcatCookie cookie = new TomcatCookie(Globals.SESSION_COOKIE_NAME,
                    session.getIdInternal());
            configureSessionCookie(cookie);
            response.addCookieInternal(cookie);
        }
View Full Code Here

Examples of org.apache.tomcat.util.http.TomcatCookie

        // Creating a new session cookie based on that session
        // If there was no cookie with the current session id, add a cookie to the response
        if ( (session != null) && (getContext() != null)
               && getContext().getCookies()
               && !(isRequestedSessionIdFromCookie() && (session.getIdInternal().equals(getRequestedSessionId()))) ) {
            TomcatCookie cookie = new TomcatCookie(Globals.SESSION_COOKIE_NAME,
                    session.getIdInternal());
            configureSessionCookie(cookie);
            response.addCookieInternal(cookie);
        }
View Full Code Here

Examples of org.apache.tomcat.util.http.TomcatCookie

           
            // Reply modification

            // - cookie
            if (rules[i].isCookie() && newtest != null) {
                TomcatCookie cookie = new TomcatCookie(rules[i].getCookieName(),
                        rules[i].getCookieResult());
                cookie.setDomain(rules[i].getCookieDomain());
                cookie.setMaxAge(rules[i].getCookieLifetime());
                cookie.setPath(rules[i].getCookiePath());
                cookie.setSecure(rules[i].isCookieSecure());
                cookie.setHttpOnly(rules[i].isCookieHttpOnly());
                response.addCookie(cookie);
            }
            // - env (note: this sets a request attribute)
            if (rules[i].isEnv() && newtest != null) {
                for (int j = 0; j < rules[i].getEnvSize(); j++) {
View Full Code Here

Examples of org.apache.tomcat.util.http.TomcatCookie

        // Creating a new session cookie based on that session
        // If there was no cookie with the current session id, add a cookie to the response
        if ( (session != null) && (getContext() != null)
               && getContext().getCookies()
               && !(isRequestedSessionIdFromCookie() && (session.getIdInternal().equals(getRequestedSessionId()))) ) {
            TomcatCookie cookie = new TomcatCookie(Globals.SESSION_COOKIE_NAME,
                    session.getIdInternal());
            configureSessionCookie(cookie);
            response.addCookieInternal(cookie);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.