[jboss-dev-forums] [JBoss AS7 Development] - How to use resteasy on jboss as 7?

baecks do-not-reply at jboss.com
Mon Aug 29 03:51:06 EDT 2011


baecks [http://community.jboss.org/people/baecks] created the discussion

"How to use resteasy on jboss as 7?"

To view the discussion, visit: http://community.jboss.org/message/623409#623409

--------------------------------------------------------------
I created a web application in eclipse and included the following code into my web.xml:

<?xml version="1.0" encoding="UTF-8"?>


<web-app version="3.0" xmlns=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee"
          xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee  http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
</web-app>

The I created a simple POJO, to handle requests:

//@ApplicationPath( "api" )
@Path("tutorial")
public class RestRequest1 {
          @GET
          @Path("helloworld")
          public String helloworld() {
                    return "Hello World!";
          }
}

When deploying this to AS7, the resteasy doesn't seem to be activated and pick up the code. No matter what URL I try (from the eclipse built-in browser), I get a page not found error ( http:// http://<context>/tutorial/helloworld -  http:// http://<context>/api/tutorial/helloworld -  http:// http://<context>/api/helloworld). Nothing works!

Does anybody know how to make resteasy work on AS 7 (should be part of AS 7 and ready for use I read)?

Thanks,
Sven.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/623409#623409]

Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110829/2d3bed93/attachment.html 


More information about the jboss-dev-forums mailing list