Embedded Jetty + Jersey Restful Setting :: 2013/08/22 08:56

<Jetty Version : 9.0.4>
필수 Jetty Library : jetty-servlet, servlet-api (Maven으로 의존관계의 Library 관리)
private static final String JERSEY_RESOURCES = "리소스패키지(ex. net.yongbi.rest)";

Server server = new Server(port);
ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
context.setContextPath("/");
server.setHandler(context);
ServletHolder h = new ServletHolder(new ServletContainer());
h.setInitParameter("com.sun.jersey.config.property.packages", JERSEY_RESOURCES);
context.addServlet(h, "/*");

server.start();
server.join();

2013/08/22 08:56 2013/08/22 08:56
Trackback Address :: http://www.yongbi.net/trackback/577
[로그인][오픈아이디란?]
오픈아이디로만 댓글을 남길 수 있습니다
Name
Password
Homepage

Secret
< PREV |  1  |  ...  213  |  214  |  215  |  216  |  217  |  218  |  219  |  220  |  221  |  ...  566  |  NEXT >