Examples of SessionHandler


Examples of org.mortbay.jetty.servlet.SessionHandler

    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();
   
    HttpClient httpClient = new HttpClient();
View Full Code Here

Examples of org.mortbay.jetty.servlet.SessionHandler

    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();
   
    HttpClient httpClient = new HttpClient();
View Full Code Here

Examples of org.mortbay.jetty.servlet.SessionHandler

     * @throws Exception
     */
    public JBossSipAppContext(WebDescriptorParser descriptorParser,WebApplication webApp, String warUrl)
    throws Exception
    {
        super(null,new SessionHandler(), new Jsr77ServletHandler(), null);
        setWar(warUrl);
        ((Jsr77ServletHandler)getServletHandler()).setWebAppContext(this);
        _descriptorParser=descriptorParser;
        _di = descriptorParser.getDeploymentInfo();
        _webApp=webApp;
View Full Code Here

Examples of org.mortbay.jetty.servlet.SessionHandler

    }

    public JBossSipAppContext(DeploymentInfo di, String warUrl)
    throws Exception
    {
        super(null,new SessionHandler(), new Jsr77ServletHandler(), null);
        setWar(warUrl);
        ((Jsr77ServletHandler)getServletHandler()).setWebAppContext(this);
        _di = di;
        //very important - establish the classloader now, as it is the one
        //that is being used for the performDeploy step
View Full Code Here

Examples of org.mortbay.jetty.servlet.SessionHandler

    }

    public class MockSessionHandlerFactory implements SessionHandlerFactory {
        public SessionHandler createHandler(PreHandler preHandler) {
            return new SessionHandler();
        }
View Full Code Here

Examples of org.mortbay.jetty.servlet.SessionHandler

        this.holder = holder == null ? Holder.EMPTY : holder;

        this.runAsSource = runAsSource == null? RunAsSource.NULL: runAsSource;

        SessionHandler sessionHandler;
        if (null != handlerFactory) {
            if (null == preHandlerFactory) {
                throw new IllegalStateException("A preHandlerFactory must be set if an handler factory is set.");
            }
            PreHandler preHandler = preHandlerFactory.createHandler();
            sessionHandler = handlerFactory.createHandler(preHandler);
        } else {
            sessionHandler = new SessionHandler();
        }
        JettySecurityHandler securityHandler = null;
        if (securityRealmName != null) {
            InternalJAASJettyRealm internalJAASJettyRealm = jettyContainer.addRealm(securityRealmName);
            //wrap jetty realm with something that knows the dumb realmName
View Full Code Here

Examples of org.mortbay.jetty.servlet.SessionHandler

        assert configurationBaseUrl != null;
        assert transactionManager != null;
        assert trackedConnectionAssociator != null;
        assert jettyContainer != null;
       
        SessionHandler sessionHandler;
        if (null != handlerFactory) {
            if (null == preHandlerFactory) {
                throw new IllegalStateException("A preHandlerFactory must be set if an handler factory is set.");
            }
            PreHandler preHandler = preHandlerFactory.createHandler();
            sessionHandler = handlerFactory.createHandler(preHandler);
        } else {
            sessionHandler = new SessionHandler();
        }
        //TODO construct an interceptor chain inside one of the Handlers.
        JettySecurityHandler securityHandler = null;
        if (securityRealmName != null) {
            securityHandler = new JettySecurityHandler();
View Full Code Here

Examples of org.mortbay.jetty.servlet.SessionHandler

        File base = getResource( SERVER_ROOT_RESOURCE_PATH );
        logger.info( "docroot: " + base );
        webappContext.setWar( base.getAbsolutePath() );
        webappContext.addHandler( securityHandler );

        SessionHandler sessionHandler = webappContext.getSessionHandler();
        ( (AbstractSessionManager) sessionHandler.getSessionManager() ).setUsingCookies( false );

        HandlerCollection handlers = new HandlerCollection();
        handlers.setHandlers( new Handler[]{ webappContext, new DefaultHandler() } );

        server.setHandler( handlers );
View Full Code Here

Examples of org.mortbay.jetty.servlet.SessionHandler

    /**
     */
    public WebAppContext(SecurityHandler securityHandler,SessionHandler sessionHandler, ServletHandler servletHandler, ErrorHandler errorHandler)
    {
        super(null,
              sessionHandler!=null?sessionHandler:new SessionHandler(),
              securityHandler!=null?securityHandler:new SecurityHandler(),
              servletHandler!=null?servletHandler:new ServletHandler(),
              null);
       
        setErrorHandler(errorHandler!=null?errorHandler:new ErrorPageErrorHandler());
View Full Code Here

Examples of org.mortbay.jetty.servlet.SessionHandler

        String contextPath = "/lightLoad";
        String servletMapping = "/server";
        int port1 = random.nextInt(50000) + 10000;
        Server server1 = new Server(port1);
        WebAppContext context1 = new WebAppContext(warDir.getCanonicalPath(), contextPath);
        context1.setSessionHandler(new SessionHandler());
        context1.addServlet(TestServlet.class, servletMapping);
        server1.setHandler(context1);
        server1.start();
        try
        {
            int port2 = random.nextInt(50000) + 10000;
            Server server2 = new Server(port2);
            WebAppContext context2 = new WebAppContext(warDir.getCanonicalPath(), contextPath);
            context2.setSessionHandler(new SessionHandler());
            context2.addServlet(TestServlet.class, servletMapping);
            server2.setHandler(context2);
            server2.start();
            try
            {
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.