Class HtmlDocSerializer

All Implemented Interfaces:
AnnotationProvider, HtmlMetaProvider, XmlMetaProvider
Direct Known Subclasses:

Serializes POJOs to HTTP responses as HTML documents.
Media types

Handles Accept types: text/html

Produces Content-Type types: text/html


Same as HtmlSerializer, except wraps the response in <html>, <head>, and <body> tags so that it can be rendered in a browser.

Configurable properties are typically specified via @HtmlDocConfig.


@Rest( messages="nls/AddressBookResource", title="$L{title}", description="$L{description}" ) @HtmlDocConfig( navlinks={ "api: servlet:/api", "doc: doc" } ) public class AddressBookResource extends BasicRestServlet {

The $L{...} variable represent localized strings pulled from the resource bundle identified by the messages annotation.
These variables are replaced at runtime based on the HTTP request locale.
Several built-in runtime variable types are defined, and the API can be extended to include user-defined variables.

  • This class is thread safe and reusable.
See Also: