[jboss-user] Discovery of java.ws.rs.Path annotation in JBoss 6 M2

Tim Terlegård tim.terlegard at gmail.com
Wed Apr 7 16:13:22 EDT 2010


What is needed in an app that uses JBoss 6 M2 to get annotation
discovery working?

I'm trying to create a really simple application. I just have an
index.jsp and a class with a javax.ws.rs.Path annotation. Pointing the
browser to /myapp/index.jsp works just fine, but pointing it o
/myapp/foo does not. This is the code of the class.

import javax.ws.rs.Path;
import javax.ws.rs.GET;

@Path("/foo")
class Hello {
    @GET
    public String world() {
        return "bar";
    }
}

I have no web.xml or MANIFEST.MF. I have a practically empty
application.xml. Should I have something in these or should it work
anyway?

Thanks,
Tim



More information about the jboss-user mailing list