When I deploy a RestEasy war in JBoss 7.1.1.Final the services never seems to be made available. I leave web.xml blank to allow for the auto-detect. After deployment no Restful services are available. Using a web browser I cannot access "books".
web.xml <?xml version="1.0" encoding="UTF-8"?> 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_2_5.xsd" version="2.5"> </web-app> package com.robert; import javax.ws.rs.ApplicationPath; import javax.ws.rs.core.Application; @ApplicationPath("services") public class HelloWorld extends Application { public HelloWorld() { super(); } } package com.robert; import javax.ws.rs.*; import javax.ws.rs.core.Application; @Path("library") public class Library extends Application { @GET @Path("/books") public String getBooks() { return "this is all your books"; } @GET @Path("/book/{isbn}") public String getBook(@PathParam("isbn") String id) { // search my database and get a string representation and return it return "Its a good book; I read it"; } @PUT @Path("/book/{isbn}") public void addBook(@PathParam("isbn") String id, @QueryParam("name") String name) { System.out.println("Adding book "+name); } @DELETE @Path("/book/{id}") public void removeBook(@PathParam("id") String id ){ System.out.println("Removing book "+id); } }
RestEasyApp3.war
Description: Binary data
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users