Package org.mortbay.jetty.servlet

Examples of org.mortbay.jetty.servlet.ServletHttpContext


                while ( itcontext.hasNext() )
                {
                    Context wdc = (Context) itcontext.next();

                    ServletHttpContext context = (ServletHttpContext) server.getContext( wdc.getId() );

                    initContext( wdc, context );
                }
            }
            catch ( Exception e )
View Full Code Here


                    " on port <" + port + ">" +
                    " with contextPath <" + contextPath + ">" +
                    " and resourceBase <" + resourceBase + ">");

            httpServer = new Server();
            ServletHttpContext jsunitContext = new ServletHttpContext();
            jsunitContext.setContextPath(contextPath);
            jsunitContext.setResourceBase(resourceBase);

            ResourceHandler resourceHandler = new ResourceHandler();
            resourceHandler.setDirAllowed(false);

            jsunitContext.addHandler(resourceHandler);
            httpServer.addContext(jsunitContext);

            SocketListener listener = new SocketListener();
            listener.setPort(port);
            httpServer.addListener(listener);
View Full Code Here

    }

    protected abstract ConfigurationProvider createConfigurationProvider();

    protected void addServerContext() throws Exception {
        ServletHttpContext jsunitContext = new ServletHttpContext();
        jsunitContext.setContextPath("jsunit");
        jsunitContext.setResourceBase(resourceBase());
        ResourceHandler resourceHandler = new ResourceHandler();
        resourceHandler.setDirAllowed(false);
        jsunitContext.addHandler(resourceHandler);
        for (String servletName : servletNames())
            jsunitContext.addServlet("webwork", "/" + servletName, ServletDispatcher.class.getName());
        httpServer.addContext(jsunitContext);
    }
View Full Code Here

    }
    engine.start();
   
    server = new Server();
    server.addListener(args[1]);
    ServletHttpContext context = (ServletHttpContext)server.getContext("/sms-engine");
    context.addServlet("SMSEngineServiceController", "/controller", "ru.headhunter.smsengine.server.SMSEngineServiceController");
    context.addServlet("SMSEngineService", "/service", "ru.headhunter.smsengine.server.SMSEngineService");
    server.start();
   
  }
View Full Code Here

TOP

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

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.