Package org.apache.catalina

Examples of org.apache.catalina.Manager.createSession()


        // phishing attacks
        if (connector.getEmptySessionPath()
                && isRequestedSessionIdFromCookie()) {
            session = manager.createSession(getRequestedSessionId());
        } else {
            session = manager.createSession(null);
        }

        // Creating a new session cookie based on that session
        if ((session != null) && (getContext() != null)
               && getContext().getCookies()) {
View Full Code Here


            response.getResponse().isCommitted()) {
            throw new IllegalStateException
              (sm.getString("coyoteRequest.sessionCreateCommitted"));
        }

        session = manager.createSession();

        // Creating a new session cookie based on that session
        if ((session != null) && (getContext() != null)
            && getContext().getCookies()) {
            Cookie cookie = new Cookie(Globals.SESSION_COOKIE_NAME,
View Full Code Here

                }
            } else if (!isRequestedSessionIdFromCookie()) {
                sessionId = null;
            }
        }
        session = manager.createSession(sessionId);

        // 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()
View Full Code Here

        // Attempt to reuse session id if one was submitted in a cookie
        // Do not reuse the session id if it is from a URL, to prevent possible
        // phishing attacks
        if (connector.getEmptySessionPath()
                && isRequestedSessionIdFromCookie()) {
            session = manager.createSession(getRequestedSessionId());
        } else {
            session = manager.createSession(null);
        }

        // Creating a new session cookie based on that session
View Full Code Here

        // phishing attacks
        if (connector.getEmptySessionPath()
                && isRequestedSessionIdFromCookie()) {
            session = manager.createSession(getRequestedSessionId());
        } else {
            session = manager.createSession(null);
        }

        // Creating a new session cookie based on that session
        if ((session != null) && (getContext() != null)
               && getContext().getCookies()) {
View Full Code Here

                }
            } else if (!isRequestedSessionIdFromCookie()) {
                sessionId = null;
            }
        }
        session = manager.createSession(sessionId);

        // 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) && context.getCookies()
               && !(isRequestedSessionIdFromCookie() && (session.getIdInternal().equals(getRequestedSessionId()))) ) {
View Full Code Here

        // Shift to Manager interface when we simulate Tomcat
        Manager mgr = manager;
        Session sess = mgr.findSession(id);
        assertNull("session does not exist", sess);
        try {
            sess = mgr.createSession(id, new Random());
            if (!canCreate)
                fail("Could not create session" + id);
        } catch (IllegalStateException ise) {
            if (canCreate) {
                log.error("Failed to create session " + id, ise);
View Full Code Here

        // Shift to Manager interface when we simulate Tomcat
        Manager mgr = manager;
        Session sess = mgr.findSession(id);
        assertNull("session does not exist", sess);
        try {
            sess = mgr.createSession(id, new Random());
            if (!canCreate)
                fail("Could not create session" + id);
        } catch (IllegalStateException ise) {
            if (canCreate) {
                ise.printStackTrace(System.err);
View Full Code Here

                    session = null;
                }
            }

            if (session == null && create) {
                session = manager.createSession(requestedSessionId, new Random());
            }

            if (session != null) {
                session.access();
            }
View Full Code Here

        // Attempt to reuse session id if one was submitted in a cookie
        // Do not reuse the session id if it is from a URL, to prevent possible
        // phishing attacks
        if (connector.getEmptySessionPath()
                && isRequestedSessionIdFromCookie()) {
            session = manager.createSession(getRequestedSessionId());
        } else {
            session = manager.createSession(null);
        }

        // Creating a new session cookie based on that session
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.