RestServlet

The {@link oajr.RestServlet} class is the entry point for your REST resources. It extends directly from HttpServlet and is deployed like any other servlet.

When the servlet init() method is called, it triggers the code to find and process the @Rest annotations on that class and all child classes. These get constructed into a {@link oajr.RestContext} object that holds all the configuration information about your resource in a read-only object.

Most developers are not going to be using the RestServlet class itself, and instead will extend from one of the preconfigured default servlets such as {@link oajr.BasicRestServlet}. The RestServlet class by itself is not configured with any serializers and parsers, and therefore not very useful on it's own. However, the class does provide a couple of convenience methods to be aware of: