Note that there are some explanatory texts on larger screens.

plurals
  1. POIntegrating Jetty with RESTEasy
    primarykey
    data
    text
    <p>Any links on how to integrate Jetty and RESTEasy? I am kinda stuck trying to configure RESTEasy with Jetty together....and there seems to be no credible help on the web.</p> <pre><code>public static void main(String[] args) throws Exception { Server server = new Server(8080); WebAppContext context = new WebAppContext(); context.setDescriptor("../WEB-INF/web.xml"); context.setResourceBase("../src/webapp"); context.setContextPath("/"); context.setParentLoaderPriority(true); server.setHandler(context); server.start(); server.join(); } </code></pre> <p>My Web.xml is copied directly from: <a href="http://docs.jboss.org/resteasy/docs/1.0.0.GA/userguide/html/Installation_Configuration.html" rel="noreferrer">http://docs.jboss.org/resteasy/docs/1.0.0.GA/userguide/html/Installation_Configuration.html</a></p> <p>The error I get back is a HTTP 404 when I try to open up a link in my resource file. Everything looks reasonable on the surface, any suggestions?</p> <p>My resource file looks like:</p> <pre><code>package webapp; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; @Path("/*") public class Resource { @GET public String hello() { return "hello"; } @GET @Path("/books") public String getBooks() { return "books"; } @GET @Path("/book/{isbn}") public String getBook(@PathParam("isbn") String id) { return "11123"; } } </code></pre> <p>This is the prints that I see when Jetty starts up:</p> <p>2012-04-10 09:54:27.163:INFO:oejs.Server:jetty-8.1.1.v20120215 2012-04-10 09:54:27.288:INFO:oejw.StandardDescriptorProcessor:NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet 2012-04-10 09:54:27.319:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/C:/Users/xyz/Anotherproj1/src/webapp} 2012-04-10 09:54:27.319:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/C:/Users/xyz/Anotherproj1/src/webapp} 2012-04-10 09:54:27.381:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload