I've been trying for a few days now to obtain a response with RESTeasy,
    only with very little success--I was able to receive a request on my
    Resource class when explicitly adding said resource class as a
singleton in
    my Application-extending class, but I've had no luck in trying to make
    RESTeasy scan for these classes automatically, even with resteasy.scan
set
    to true in web.xml

    My web.xml file is empty except for a resteasy.logger.type context-param
    specifying LOG4J.

    Here's a basic application class (apologies for lack of formatting,
seems like any font change leads to my email getting bounced):



    import javax.ws.rs.ApplicationPath;
    import javax.ws.rs.core.Application;
    @ApplicationPath("/rest")
    public class RootApplication extends Application {
    }


    And here's a basic resource class:



    import java.util.Date;
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.Produces;

    @Path("/hello")
    public class HelloWorld {
       @GET
       @Produces("text/plain")
       public String helloResource() {
          return "Hello! It's "+new Date();
       }
    }




    I don't use Maven, so I have no pom.xml, though to my knowledge this
isn't
    relevant if I just grab the needed jars myself. These are the jars I've
    added:

    httpclient-4.3.jar
    annotations.jar
    jars-api-3.0.9.Final.jar
    resteasy-jaxrs-3.0.17.Final.jar

    I feel as though this would be easier to diagnose if restEASY logged
    anything, however it's not doing so despite having this property in my
    log4j.properties:

    log4j.logger.org.jboss.resteasy=INFO


    Visiting http://localhost/rest/hello  after all this just returns a
basic
    Tomcat 404 page, "The requested resource is not available". I really
have
    no idea what's going on under the hood with logging not working. My
tomcat
    is functioning otherwise, also.

    Any help would be greatly appreciated.
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to