7
프로그래밍 방식으로 Jetty 7.0에 서블릿을 등록하려고합니다. 내가 찾은 모든 사례는 부두 6에 대한 것이고 부두 7은 상당히 다릅니다. 여기 내 서버 쪽 :Jetty에 프로그래밍 방식으로 서블릿 등록하기
이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");
}
}
이 테스트의 결과는 단절이 시작됩니다,하지만 클라이언트가 연결에 실패 java.io.FileNotFoundException : http://localhost:8080/hessian-service이
내가 내 브라우저에서 아무것도 볼에 의한 http://localhost:8080/hessian-service. 서블릿에 액세스 할 감사
당신이 부두에 대한이 질문에 대답하십시오 할 수 있습니다. http://stackoverflow.com/questions/6015999/jersey-filters-in-non-servlet-container – Apurv