Examples of HashSessionManager


Examples of org.eclipse.jetty.server.session.HashSessionManager

    rootContext.setServer(server);
    rootContext.setWar(location.toExternalForm());
    rootContext.setTempDirectory(tempDir);

    // Set cookies HttpOnly so they are not accessible to JavaScript engines
    HashSessionManager sessionManager = new HashSessionManager();
    sessionManager.setHttpOnly(true);
    // Use secure cookies if only serving https
    sessionManager.setSecureRequestOnly(params.port <= 0 && params.securePort > 0);
    rootContext.getSessionHandler().setSessionManager(sessionManager);

    // Ensure there is a defined User Service
    String realmUsers = params.userService;
    if (StringUtils.isEmpty(realmUsers)) {
View Full Code Here

Examples of org.mortbay.jetty.servlet.HashSessionManager

    // start jetty server
    int jettyPort = 9437;

    org.mortbay.jetty.Server jettyServer = new org.mortbay.jetty.Server(jettyPort);
    org.mortbay.jetty.servlet.Context rootCtx = new org.mortbay.jetty.servlet.Context(jettyServer, "/ctx/subctx");
    rootCtx.setSessionHandler(new SessionHandler(new HashSessionManager()));
    ServletHolder servletHolder = new ServletHolder(new CompareServlet());
    rootCtx.addServlet(servletHolder, "/hdlPath/*");
    jettyServer.start();


 
View Full Code Here

Examples of org.mortbay.jetty.servlet.HashSessionManager

    // start jetty server
    int jettyPort = 9437;

    org.mortbay.jetty.Server jettyServer = new org.mortbay.jetty.Server(jettyPort);
    org.mortbay.jetty.servlet.Context rootCtx = new org.mortbay.jetty.servlet.Context(jettyServer, "/ctx/subctx");
    rootCtx.setSessionHandler(new SessionHandler(new HashSessionManager()));
    ServletHolder servletHolder = new ServletHolder(new CompareServlet());
    rootCtx.addServlet(servletHolder, "/hdlPath/*");
    jettyServer.start();


 
View Full Code Here

Examples of org.mortbay.jetty.servlet.HashSessionManager

 
    // start jetty server
    int jettyPort = 9189;
    org.mortbay.jetty.Server jettyServer = new org.mortbay.jetty.Server(jettyPort);
    org.mortbay.jetty.servlet.Context rootCtx = new org.mortbay.jetty.servlet.Context(jettyServer, "");
    HashSessionManager sm = new HashSessionManager();
    sm.setUsingCookies(false);
    rootCtx.setSessionHandler(new SessionHandler(sm));
    ServletHolder servletHolder = new ServletHolder(new MyServlet3());
    rootCtx.addServlet(servletHolder, "/*");
    jettyServer.start();
   
 
View Full Code Here

Examples of org.mortbay.jetty.servlet.HashSessionManager


  public void start() throws Exception {
    jettyServer = new Server(0);
    Context rootCtx = new Context(jettyServer, context);
    rootCtx.setSessionHandler(new SessionHandler(new HashSessionManager()));
    ServletHolder servletHolder = new ServletHolder(servlet);
    rootCtx.addServlet(servletHolder, servletPath + "/*");
    jettyServer.start();
   
    port = jettyServer.getConnectors()[0].getLocalPort();
View Full Code Here

Examples of org.mortbay.jetty.servlet.HashSessionManager

 
    // start jetty server
    int jettyPort = 9189;
    org.mortbay.jetty.Server jettyServer = new org.mortbay.jetty.Server(jettyPort);
    org.mortbay.jetty.servlet.Context rootCtx = new org.mortbay.jetty.servlet.Context(jettyServer, "");
    HashSessionManager sm = new HashSessionManager();
    sm.setUsingCookies(false);
    rootCtx.setSessionHandler(new SessionHandler(sm));
    ServletHolder servletHolder = new ServletHolder(new MyServlet3());
    rootCtx.addServlet(servletHolder, "/*");
    jettyServer.start();
   
 
View Full Code Here

Examples of org.mortbay.jetty.servlet.HashSessionManager

 
    // start jetty server
    int jettyPort = 9189;
    org.mortbay.jetty.Server jettyServer = new org.mortbay.jetty.Server(jettyPort);
    org.mortbay.jetty.servlet.Context rootCtx = new org.mortbay.jetty.servlet.Context(jettyServer, "");
    HashSessionManager sm = new HashSessionManager();
    sm.setUsingCookies(false);
    rootCtx.setSessionHandler(new SessionHandler(sm));
    ServletHolder servletHolder = new ServletHolder(new MyServlet3());
    rootCtx.addServlet(servletHolder, "/*");
    jettyServer.start();
   
 
View Full Code Here

Examples of org.mortbay.jetty.servlet.HashSessionManager

                        WebAppContext context = new WebAppContext(location, mountPoint);
                        context.setAttribute("_serverId", webappInfo.server);
                        context.setLogUrlOnStart(true);

                         // set the session manager
                        HashSessionManager sm = new HashSessionManager();
                        context.setSessionHandler(new SessionHandler(sm));

                        // set the virtual hosts
                        if (virtualHosts != null && !virtualHosts.isEmpty()) {
                            context.setVirtualHosts((String[]) virtualHosts.toArray());
View Full Code Here

Examples of org.mortbay.jetty.servlet.HashSessionManager

       
        assertEquals("http://host:port/path/info;param?query=0&more=1#target",response.encodeRedirectUrl("http://host:port/path/info;param?query=0&more=1#target"));
      
        request.setRequestedSessionId("12345");
        request.setRequestedSessionIdFromCookie(false);
        AbstractSessionManager manager=new HashSessionManager();
        manager.setIdManager(new HashSessionIdManager());
        request.setSessionManager(manager);
        request.setSession(new TestSession(manager,"12345"));
       
        assertEquals("http://host:port/path/info;param;jsessionid=12345?query=0&more=1#target",response.encodeRedirectUrl("http://host:port/path/info;param?query=0&more=1#target"));
             
View Full Code Here

Examples of org.mortbay.jetty.servlet.HashSessionManager

        context.setContextPath(contextName);
       
        // bind the jetty http handler with the context handler       
        context.setHandler(handler);
        if (isSessionSupport) {           
            HashSessionManager sessionManager = new HashSessionManager();
            SessionHandler sessionHandler = new SessionHandler(sessionManager);
            HashSessionIdManager idManager = new HashSessionIdManager();
            sessionManager.setIdManager(idManager);           
            context.addHandler(sessionHandler);          
        }
        contexts.addHandler(context);
       
        ServletContext sc = context.getServletContext();
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.