Package org.mortbay.jetty.servlet

Examples of org.mortbay.jetty.servlet.ServletHolder


                    ServletHandler handler = new ServletHandler();
                    Class servletClass = servletClassName == null ?
                            EmbeddedServletClient.class : Class.forName(servletClassName);

                    ServletHolder holder = new ServletHolder(servletClass);
                    handler.addServletWithMapping(holder, "/*");

                    holder.setInitParameter("application", appName);
                    // holder.setInitParameter("mountpoint", mountpoint);

                    if (cookieDomain != null) {
                        holder.setInitParameter("cookieDomain", cookieDomain);
                    }

                    if (sessionCookieName != null) {
                        holder.setInitParameter("sessionCookieName", sessionCookieName);
                    }

                    if (protectedSessionCookie != null) {
                        holder.setInitParameter("protectedSessionCookie", protectedSessionCookie);
                    }

                    if (uploadLimit != null) {
                        holder.setInitParameter("uploadLimit", uploadLimit);
                    }

                    if (uploadSoftfail != null) {
                        holder.setInitParameter("uploadSoftfail", uploadSoftfail);
                    }

                    if (debug != null) {
                        holder.setInitParameter("debug", debug);
                    }
                   
                    appContext.setHandler(handler);

                    if (protectedStaticDir != null) {
View Full Code Here


                    Class.class, RunAsCollection.class, InjectionCollection.class, LifeCycleCallbackCollection.class);

            //look thru _servlets
            Iterator itor = LazyList.iterator(_servlets);
            while (itor.hasNext()) {
                ServletHolder holder = (ServletHolder) itor.next();
                Class servlet = getWebAppContext().loadClass(holder.getClassName());
                parseAnnotationsMethod.invoke(null, getWebAppContext(), servlet, _runAsCollection, _injections,
                        _callbacks);
            }

            //look thru _filters
            itor = LazyList.iterator(_filters);
            while (itor.hasNext()) {
                FilterHolder holder = (FilterHolder) itor.next();
                Class filter = getWebAppContext().loadClass(holder.getClassName());
                parseAnnotationsMethod.invoke(null, getWebAppContext(), filter, null, _injections, _callbacks);
            }

            //look thru _listeners
            itor = LazyList.iterator(_listeners);
View Full Code Here

       
        Context context = new Context(httpServer,"/",Context.SESSIONS);
       
       
       
        ServletHolder servlet = new ServletHolder(new XFireServlet());
       
        context.addServlet(servlet, "/*");
        SecurityHandler sh = new SecurityHandler();
        context.addHandler(sh);
       
View Full Code Here

        server = new Server(8391);
        ServletHandler handler = new ServletHandler ();
       
        Context context = new Context(server,"/",Context.SESSIONS);
       
        ServletHolder servlet = new ServletHolder(new XFireServlet());
        handler.addServlet(servlet);
       
        context.addServlet(servlet, "/*");
       
        context.addFilter("com.planetj.servlet.filter.compression.CompressingFilter", "/*", 0);
View Full Code Here

   
    org.mortbay.jetty.Server jettyServer = new org.mortbay.jetty.Server(0);
   
    org.mortbay.jetty.servlet.Context rootCtx = new org.mortbay.jetty.servlet.Context(jettyServer, "/ctx1");
    ServletHolder servletHolder = new ServletHolder(new TestServlet());
    rootCtx.addServlet(servletHolder, "/test/*");
    jettyServer.start();
   
   
    Context ctx = new Context("/ctx1");
View Full Code Here

    // start jetty server
    org.mortbay.jetty.Server jettyServer = new org.mortbay.jetty.Server(0);
   
    org.mortbay.jetty.servlet.Context subCtx = new org.mortbay.jetty.servlet.Context(jettyServer, "/ctx0/ctx1");
   
    ServletHolder servletHolder = new ServletHolder(new CompareParametersServlet());
    subCtx.addServlet(servletHolder, "/test/*");
    jettyServer.start();
   

   
 
View Full Code Here

        _resolver = new YadisResolver(new HttpFetcherFactory());

        _server = new Server(_servletPort);

        Context context = new Context(_server, "/", Context.SESSIONS);
        context.addServlet(new ServletHolder(new YadisTestServlet()), "/*");

        _server.start();

    }
View Full Code Here

        Context context = new Context(_server, "/", Context.SESSIONS);
        _baseUrl = "http://localhost:" + servletPort; // +
        // context.getContextPath();

        SampleConsumer consumer = new SampleConsumer(_baseUrl + "/loginCallback");
        context.addServlet(new ServletHolder(new LoginServlet(consumer)), "/login");
        context.addServlet(new ServletHolder(new LoginCallbackServlet(consumer)), "/loginCallback");

        context.addServlet(new ServletHolder(new UserInfoServlet()), "/user");

        SampleServer server = new SampleServer(_baseUrl + "/provider")
        {
            protected List userInteraction(ParameterList request) throws ServerException
            {
                List back = new ArrayList();
                back.add("userSelectedClaimedId"); // userSelectedClaimedId
                back.add(Boolean.TRUE); // authenticatedAndApproved
                back.add("user@example.com"); // email
                return back;
            }
        };
        context.addServlet(new ServletHolder(new ProviderServlet(server)), "/provider");
    }
View Full Code Here

    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();


    Context ctx = new Context("/ctx/subctx");
View Full Code Here

    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();


    Context ctx = new Context("/ctx/subctx");
View Full Code Here

TOP

Related Classes of org.mortbay.jetty.servlet.ServletHolder

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.