jboss7.x - JBoss AS 7 Restful Webservices not auto deploying -


I'm trying to use built in the Rethal Web Services with Zebos AS7. My web XML is ..

  & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Web-app xmlns = "http://java.sun.com/xml/ns/javaee" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" XSI: Schema location = "Http : //java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd "version =" 2.5 "& gt; & Lt; / Web application & gt;   

My application class is ...

  package com.robert; Import javax.ws.rs.ApplicationPath; Import javax.ws.rs.core.Application; Import java.util.HashSet; Import java.util.Set; @App Path ("/ services") enhances public category hello applications {Private set & lt; Object & gt; Singletons = New Hashet & lt; Object & gt; (); Public Hallowld () {singletons.add (New Library ()); } @ Override Public Set & lt; Classroom & lt ;? & Gt; & Gt; GetClasses () {Set & lt; Classroom & lt ;? & Gt; & Gt; Class = new hashset & lt; Classroom & lt ;? & Gt; & Gt; (); Classes.add (Library.class); Return classes; // File to replace body of overwritten methods. Settings | File templates} @ override public set & lt; Object & gt; GetSingletons () {return singletons; }   

}

and my class

  import javax.ws.rs. *; @ Path ("/ library") public class library {@GET @ path ("/ books") public string matching books () {return "this is all your books"; } @GET @ path ("/ book / {isbn}") public string getBook (@PathPermum ("ISBN") string ID) {// Find my database and get the representation of string and return it "Its a good Book; I have read it "; } @PUT @Path ("/ book / {isbn}") Public ZeroAdbook (@PathParam ("ISBN") string ID, @ kyaparam ("name") string name) {System.out.println ("Adding a book "+ Name); } @DELETE @ path ("/ book / {ID}") Public Zero removal book (@ Pathprem ("id") string id) {System.out.println ("delete book" + id); }   

}

However, when I start JBS AS7, webserver never starts. I do not think it is a jabos management page and I do not see it on

  http: // foobar: 8080 / MyWar / services / library / books   .   

OK, I searched the problem after restEasy instructions I installed the latest version of Restacy in the Jebus module did. When I come back to the basic installation then it works. Note that Web.xml should not be not because the referral does not have any reference to the servlet, because Zebas Depar auto sees @AppPlacePep annotation on a class, when it deploys rested. Web.xml should be empty.

Comments