Package org.mortbay.jetty

Examples of org.mortbay.jetty.SessionManager


            //as the jboss webservice client tests seem to use these invalid urls
            if (_log.isDebugEnabled())
                _log.debug("Allowing non-trailing '/' on context path");
            app.setAllowNullPathInfo(true);
                
            SessionManager manager = getDistributableSessionManagerPrototype();
            if (manager != null)
            {
                throw new UnsupportedOperationException("NOT IMPLEMENTED - please ask");
//                app.setDistributableSessionManager((Manager) manager.clone());
//                if (getForceDistributable())
View Full Code Here


    {
        setRequestedId(request, dispatch);

        Request currentRequest = (request instanceof Request) ? (Request)request : HttpConnection.getCurrentConnection().getRequest();

        SessionManager requestSessionManager = currentRequest.getSessionManager();
        HttpSession requestSession = currentRequest.getSession(false);

        TerracottaSessionManager sessionManager = (TerracottaSessionManager)getSessionManager();
        Log.debug("SessionManager = {}", sessionManager);
View Full Code Here

     */
    public void setSessionManager(SessionManager sessionManager)
    {
        if (isStarted())
            throw new IllegalStateException();
        SessionManager old_session_manager = _sessionManager;
       
        if (getServer()!=null)
            getServer().getContainer().update(this, old_session_manager, sessionManager, "sessionManager",true);
       
        if (sessionManager!=null)
            sessionManager.setSessionHandler(this);
       
        _sessionManager = sessionManager;
       
        if (old_session_manager!=null)
            old_session_manager.setSessionHandler(null);
    }
View Full Code Here

            throws IOException, ServletException
    {
        setRequestedId(request, dispatch);
       
        Request base_request = (request instanceof Request) ? (Request)request:HttpConnection.getCurrentConnection().getRequest();
        SessionManager old_session_manager=null;
        HttpSession old_session=null;
       
        try
        {
            old_session_manager = base_request.getSessionManager();
View Full Code Here

        if (dispatch!=REQUEST || requested_session_id!=null)
        {
            return;
        }
       
        SessionManager sessionManager = getSessionManager();
        boolean requested_session_id_from_cookie=false;
       
        // Look for session id cookie   
        if (_sessionManager.isUsingCookies())
        {
            Cookie[] cookies=request.getCookies();
            if (cookies!=null && cookies.length>0)
            {
                for (int i=0;i<cookies.length;i++)
                {
                    if (sessionManager.getSessionCookie().equalsIgnoreCase(cookies[i].getName()))
                    {
                        if (requested_session_id!=null)
                        {
                            // Multiple jsessionid cookies. Probably due to
                            // multiple paths and/or domains. Pick the first
                            // known session or the last defined cookie.
                            if (sessionManager.getHttpSession(requested_session_id)!=null)
                                break;
                        }

                        requested_session_id=cookies[i].getValue();
                        requested_session_id_from_cookie = true;
                        if(Log.isDebugEnabled())Log.debug("Got Session ID "+requested_session_id+" from cookie");
                    }
                }
            }
        }
       
        if (requested_session_id==null)
        {
            String uri = request.getRequestURI();
           
            int semi = uri.lastIndexOf(';');
            if (semi>=0)
            {  
                String path_params=uri.substring(semi+1);
               
                // check if there is a url encoded session param.
                String param=sessionManager.getSessionURL();
                if (param!=null && path_params!=null && path_params.startsWith(param))
                {
                    requested_session_id = path_params.substring(sessionManager.getSessionURL().length()+1);
                    if(Log.isDebugEnabled())Log.debug("Got Session ID "+requested_session_id+" from URL");
                }
            }
        }
       
View Full Code Here

            //as the jboss webservice client tests seem to use these invalid urls
            if (_log.isDebugEnabled())
                _log.debug("Allowing non-trailing '/' on context path");
            app.setAllowNullPathInfo(true);
                
            SessionManager manager = getDistributableSessionManagerPrototype();
            if (manager != null)
            {
                throw new UnsupportedOperationException("NOT IMPLEMENTED - please ask");
//                app.setDistributableSessionManager((Manager) manager.clone());
//                if (getForceDistributable())
View Full Code Here

    QueuedThreadPool threadPool = maxThreads == -1 ? new QueuedThreadPool()
        : new QueuedThreadPool(maxThreads);
    threadPool.setDaemon(true);
    webServer.setThreadPool(threadPool);

    SessionManager sm = webAppContext.getSessionHandler().getSessionManager();
    if (sm instanceof AbstractSessionManager) {
      AbstractSessionManager asm = (AbstractSessionManager)sm;
      asm.setHttpOnly(true);
      asm.setSecureCookies(true);
    }
View Full Code Here

    {
        setRequestedId(request, dispatch);

        Request currentRequest = (request instanceof Request) ? (Request)request : HttpConnection.getCurrentConnection().getRequest();

        SessionManager requestSessionManager = currentRequest.getSessionManager();
        HttpSession requestSession = currentRequest.getSession(false);

        TerracottaSessionManager sessionManager = (TerracottaSessionManager)getSessionManager();
        Log.debug("SessionManager = {}", sessionManager);
View Full Code Here

    {
        Handler[] contexts = _server.getChildHandlersByClass(WebAppContext.class);
        for (int i = 0; contexts != null && i < contexts.length; i++)
        {
            WebAppContext webAppContext = (WebAppContext)contexts[i];
            SessionManager sessionManager = webAppContext.getSessionHandler().getSessionManager();
            if (sessionManager instanceof AbstractSessionManager)
            {
                Session session = ((AbstractSessionManager)sessionManager).getSession(clusterId);
                if (session != null) session.invalidate();
            }
View Full Code Here

     */
    public void setSessionManager(SessionManager sessionManager)
    {
        if (isStarted())
            throw new IllegalStateException();
        SessionManager old_session_manager = _sessionManager;
       
        if (getServer()!=null)
            getServer().getContainer().update(this, old_session_manager, sessionManager, "sessionManager",true);
       
        if (sessionManager!=null)
            sessionManager.setSessionHandler(this);
       
        _sessionManager = sessionManager;
       
        if (old_session_manager!=null)
            old_session_manager.setSessionHandler(null);
    }
View Full Code Here

TOP

Related Classes of org.mortbay.jetty.SessionManager

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.