title: Initializing Jetty+Jersey
body: <p>I'm trying to initialize Jetty with the following code:</p>
  
  <pre><code>URI baseUri = UriBuilder.fromUri("http://localhost/").port(config.getPort()).build();
  ResourceConfig resConfig = new ResourceConfig(GetFutureTimetableCommand.class);
  Server server = JettyHttpContainerFactory.createServer(baseUri, resConfig);
  
  WebAppContext context = new WebAppContext();
  context.setDescriptor("WebContent/WEB-INF/web.xml");
  context.setResourceBase("WebContent");
  context.setContextPath("rest/*");
  context.setParentLoaderPriority(true);
  server.setHandler(context);
  server.start();
  </code></pre>
  
  <p>My Resource looks like this:</p>
  
  <pre><code>@Path("/timetable")
  public class GetFutureTimetableCommand extends CMSCommand {
  
  @GET    
  @Produces(MediaType.APPLICATION_JSON)
  public CMSBean execute(@PathParam("param") String params) {
      System.out.println("GOOD");
      return new FutureTimetable(8202L, DateTime.now().plusDays(2));
  }
  }
  </code></pre>
  
  <p>And from the browser:</p>
  
  <pre><code>http://localhost:8080/rest/timetable
  </code></pre>
  
  <p>But nothing really happens, what am I doing wrong??</p>