{8.1.0-updated} Class Hierarchy

The class hierarchy for the REST servlet class is shown below:

- {@link javax.servlet.http.HttpServlet javax.servlet.http.HttpServlet}
  - {@link oajr.RestServlet org.apache.juneau.rest.RestServlet}
    Contains all the main logic.
    - {@link oajr.BasicRestServlet org.apache.juneau.rest.BasicRestServlet}
      Provides a default set of serializers, parsers, options page, stylesheet, and other common settings.
      - {@link oajr.BasicRestServletGroup org.apache.juneau.rest.BasicRestServletGroup}
        A default implementation for "router" pages.

For top-level resources, you'll typically extend from one of the classes above.

For child resources, you can either extend from one of the classes above, or extend from one of the following that provides identical support but does not extent from HttpServlet:

- {@link oajr.BasicRestConfig}
  - {@link oajr.BasicRest org.apache.juneau.rest.BasicRest}
    Provides a default set of serializers, parsers, options page, stylesheet, and other common settings.
    - {@link oajr.BasicRestGroup org.apache.juneau.rest.BasicRestGroup}
      A default implementation for "router" pages.

One reason to use the latter classes as your base classes is when you're implementing REST resources as @Bean-annotated Spring Beans and you don't want them to be automatically registered as top-level servlets.

The servlets with RDF support require Jena on the classpath. All other serializers and parsers do not have any external library dependencies. For this reason, we have separate servlets for supporting RDF so that you don't need Jena if you don't need to support RDF.

Everything is configured through the following classes which you will see a lot:

- {@link oajr.RestContext} - Each resource class instance has one copy that holds all of its configuration.
- {@link oajr.RestContextBuilder} - Builder for the class above.