2009-12-29 10 views
7

Estoy intentando registrar un servlet en Jetty 7.0 mediante programación. Todos los ejemplos que encuentro son para Jetty 6, y Jetty 7 es bastante diferente. Aquí está mi lado del servidor:Registrar programáticamente un servlet en Jetty 7

import org.eclipse.jetty.server.Server; 
import org.eclipse.jetty.servlet.ServletContextHandler; 

public class Bootstrapper { 
    public static void main(String[] args) throws Exception{ 
     Server server = new Server(8080); 
     ServletContextHandler servletContextHandler = new ServletContextHandler(server, "/context", true, false); 
     servletContextHandler.addServlet(HessianService.class, "/hessian-service"); 
     server.start(); 
     System.out.println("started"); 
    } 

} 

El resultado de esta prueba se inicia el Sever, pero el cliente no al conectar: ​​Causada por: java.io.FileNotFoundException: http://localhost:8080/hessian-service

veo nada en mi navegador al http://localhost:8080/hessian-service. Gracias

+0

¿Puede usted por favor responder a esta pregunta para embarcadero. http://stackoverflow.com/questions/6015999/jersey-filters-in-non-servlet-container – Apurv

Respuesta

Cuestiones relacionadas