Package org.eclipse.jetty.servlet

Examples of org.eclipse.jetty.servlet.ServletHandler$Default404Servlet


        } else {
            //TODO may need to turn off security with Context._options.
//            securityHandler = new NoSecurityHandler();
        }

        ServletHandler servletHandler = new ServletHandler();

        Context componentContext = contextSource.getContext();
        UserTransaction userTransaction = new GeronimoUserTransaction(transactionManager);
        Map<ServletContainerInitializer, Set<Class<?>>> servletContainerInitializerMap = new LinkedHashMap<ServletContainerInitializer, Set<Class<?>>>();
        //Set ServletContainerInitializer
View Full Code Here


        httpBindServer.setHandler(collection);
        collection.setHandlers(new Handler[] { contexts, new DefaultHandler() });
    }

    private void createBoshHandler(ContextHandlerCollection contexts, String boshPath) {
        ServletHandler handler = new ServletHandler();
        handler.addServletWithMapping(HttpBindServlet.class, "/");

        handler.addFilterWithMapping(org.eclipse.jetty.continuation.ContinuationFilter.class,"/*",0);
        ContextHandler boshContextHandler = new ContextHandler(contexts, boshPath);
        boshContextHandler.setHandler(handler);
    }
View Full Code Here

        ContextHandler boshContextHandler = new ContextHandler(contexts, boshPath);
        boshContextHandler.setHandler(handler);
    }

    private void createCrossDomainHandler(ContextHandlerCollection contexts, String crossPath) {
        ServletHandler handler = new ServletHandler();
        handler.addServletWithMapping(FlashCrossDomainServlet.class, "/crossdomain.xml");

        ContextHandler crossContextHandler = new ContextHandler(contexts, crossPath);
        crossContextHandler.setHandler(handler);
    }
View Full Code Here

    return new JcaX509CertificateConverter().getCertificate(holder);
  }

  @Before
  public void startUp() throws Exception {
    final ServletHandler handler = new ServletHandler();
    handler.addServletWithMapping(ScepServletImpl.class, PATH);

    server = new Server(0);
    server.setHandler(handler);
    server.start();
View Full Code Here

import org.jscep.server.ScepServletImpl;

public abstract class ScepServerSupport {
    public URL getUrl() throws Exception {
  final String path = "/scep/pkiclient.exe";
  final ServletHandler handler = new ServletHandler();
  handler.addServletWithMapping(ScepServletImpl.class, path);
  final Server server = new Server(0);
  server.setHandler(handler);
  server.start();

  final int port = server.getConnectors()[0].getLocalPort();
View Full Code Here

        server.setHandler(contextHandler);

        SessionHandler sessionHandler = new SessionHandler();
        contextHandler.setHandler(sessionHandler);

        ServletHandler servletHandler = new ServletHandler();
        sessionHandler.setHandler(servletHandler);

        ServletHolder holder = new ServletHolder();
        holder.setName("httpTunnel");
        holder.setClassName(HttpTunnelServlet.class.getName());
        servletHandler.setServlets(new ServletHolder[] {
            holder
        });

        ServletMapping mapping = new ServletMapping();
        mapping.setServletName("httpTunnel");
        mapping.setPathSpec("/*");
        servletHandler.setServletMappings(new ServletMapping[] {
            mapping
        });

        contextHandler.setAttribute("acceptListener", getAcceptListener());
        contextHandler.setAttribute("wireFormat", getWireFormat());
View Full Code Here

  private String host;
  private Directory serverIndexDir, handlerIndexDir;
  private ReplicationServlet replicationServlet;
 
  private void startServer() throws Exception {
    ServletHandler replicationHandler = new ServletHandler();
    ReplicationService service = new ReplicationService(Collections.singletonMap("s1", serverReplicator));
    replicationServlet = new ReplicationServlet(service);
    ServletHolder servlet = new ServletHolder(replicationServlet);
    replicationHandler.addServletWithMapping(servlet, ReplicationService.REPLICATION_CONTEXT + "/*");
    server = newHttpServer(replicationHandler);
    port = serverPort(server);
    host = serverHost(server);
  }
View Full Code Here

        } else {
            //TODO may need to turn off security with Context._options.
//            securityHandler = new NoSecurityHandler();
        }

        ServletHandler servletHandler = new ServletHandler();

        this.componentContext = contextSource.getContext();
        UserTransaction userTransaction = new GeronimoUserTransaction(transactionManager);
        integrationContext = new IntegrationContext(this.componentContext, unshareableResources, applicationManagedSecurityResources, trackedConnectionAssociator, userTransaction, bundle);
        webAppContext = new GeronimoWebAppContext(securityHandler, sessionHandler, servletHandler, null, integrationContext, classLoader, modulePath);
View Full Code Here

    }

    private void resetJettyFilterMappings() {
        //This causes jetty to recompute the filter to servlet mappings based on the
        //current servlet names in the filter mappings.  Pretty inefficient.
        ServletHandler servletHandler = jettyServletRegistration.getServletHandler();
        FilterMapping[] filterMappings = servletHandler.getFilterMappings();
        FilterMapping[] copy = filterMappings.clone();
        servletHandler.setFilterMappings(copy);
    }
View Full Code Here

            BuiltInAuthMethod builtInAuthMethod = BuiltInAuthMethod.getValueOf(authMethod);
            JettySecurityHandlerFactory  factory = new JettySecurityHandlerFactory(builtInAuthMethod, null, null, realmName, configurationFactory);
            //TODO use actual default subject here.
            securityHandler = factory.buildSecurityHandler(contextID, null, null, false);
        }
        ServletHandler servletHandler = new EJBServletHandler(webServiceContainer);
        EJBWebServiceContext webServiceContext = new EJBWebServiceContext(contextPath, securityHandler, servletHandler, classLoader);
        webServiceContext.setVirtualHosts(virtualHosts);
        addContext(webServiceContext);
        webServiceContext.start();
        webServices.put(contextPath, webServiceContext);
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.servlet.ServletHandler$Default404Servlet

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.