Venkat Nandanavanam
A simple RESTEasy Helloworld example
Technologies used
web.xml
I will post more tutorials on RESTEasy, Hornet Q, JBOSS,CDI..... in the future
Dear Readers, kindly like us on facebook to see whats happening on this blog
A simple RESTEasy Helloworld example
Technologies used
- Maven
- JBOSS AS
- RESTEasy
4.0.0 in.itsvenkis.blogspot resteasy-examples 0.0.1-SNAPSHOT war jboss-resteasy Rest easy tutorials resteasyTutorials jboss http://repository.jboss.org/maven2 org.jboss.resteasy resteasy-jaxrs 3.0.0.Final
web.xml
Service classxsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> resteasy.resources itsvenkis.blogspot.in.resteasy.examples.HelloWorldService resteasy.servlet.mapping.prefix /resteasy org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap resteasy org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher resteasy /resteasy/*
package itsvenkis.blogspot.in.resteasy.examples;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;
@Path("/helloworld")
public class HelloWorldService {
@GET
@Path("/{param}")
public Response greetUser(@PathParam("param") String name) {
return Response.status(200).entity("Hello World " + name).build();
}
}
Now build and deploy the war file and start your server and try this url
http://localhost:8080/resteasyTutorials/resteasy/helloworld/nanduI will post more tutorials on RESTEasy, Hornet Q, JBOSS,CDI..... in the future
Dear Readers, kindly like us on facebook to see whats happening on this blog
No comments:
Post a Comment