Java Reference
In-Depth Information
Now that we have verified our RESTful web service was deployed successfully, the
next step is to implement a client application that uses our service. But before doing
so let's take a look at the NetBeans generated ApplicationConfig class, which can
be seen by expanding the Generated Sources (rest) node in the project view.
The source code for this class looks like this:
* This class is generated by the Netbeans IDE,
* and registers all REST root resources created in the project.
* Please, DO NOT EDIT this class !
public class ApplicationConfig extends {
As we can see, the body of this class is empty, the purpose of this class is to configure
JAX-RS, and therefore no actual code needs to be generated. The only requirement
is that the class extends and for the class to be
annotated with the annotation. This annotation
is used to specify the base URI of all paths specified by the @Path annotation in our
RESTful web services classes. NetBeans by default uses a path named resources for
all RESTful web services.
Search WWH ::

Custom Search