JBoss Community

How to use resteasy on jboss as 7?

created by baecks in JBoss AS7 Development - View the full discussion

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"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 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://<context>/tutorial/helloworld - http://<context>/api/tutorial/helloworld - 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

Start a new discussion in JBoss AS7 Development at Community