Package org.apache.juneau.rest.servlet
Class BasicRestServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.apache.juneau.rest.servlet.RestServlet
org.apache.juneau.rest.servlet.BasicRestServlet
- All Implemented Interfaces:
- jakarta.servlet.Servlet,- jakarta.servlet.ServletConfig,- Serializable,- BasicUniversalConfig,- DefaultConfig,- DefaultHtmlConfig,- BasicRestOperations
- Direct Known Subclasses:
- AtomFeedResource,- BasicRestServletGroup,- ConfigResource,- DebugResource,- DirectoryResource,- JsonSchemaResource,- LogsResource,- PhotosResource,- RrpcServlet,- ShutdownResource
public abstract class BasicRestServlet
extends RestServlet
implements BasicRestOperations, BasicUniversalConfig
Subclass of 
RestServlet with default settings and standard methods defined.
 Meant as a base class for top-level REST resources in servlet containers.
 Provides support for JSON, XML, HTML, URL-Encoding, UON, XML, OpenAPI, and MessagePack.  See BasicUniversalConfig
 for details.
 
 Implements the basic REST endpoints defined in BasicRestOperations.
 
See Also:
- 
Field SummaryFields inherited from class jakarta.servlet.http.HttpServletLEGACY_DO_HEAD
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiderror()[* /error] - Error occurred.[GET favicon.ico] - Retrieve favorites icon image.[GET /htdocs/*] - Retrieve static file.getStats(RestRequest req) [GET /stats] - Timing statistics.getSwagger(RestRequest req) [GET /api] - Show resource options.Methods inherited from class org.apache.juneau.rest.servlet.RestServletdestroy, doLog, getContext, getPath, getRequest, getResponse, init, log, log, service, setContextMethods inherited from class jakarta.servlet.http.HttpServletdoDelete, doGet, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, isSensitiveHeader, serviceMethods inherited from class jakarta.servlet.GenericServletgetInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
- 
Constructor Details- 
BasicRestServletpublic BasicRestServlet()
 
- 
- 
Method Details- 
getSwaggerDescription copied from interface:BasicRestOperations[GET /api] - Show resource options.- Specified by:
- getSwaggerin interface- BasicRestOperations
- Parameters:
- req- The HTTP request.
- Returns:
- A bean containing the contents for the OPTIONS page.
 
- 
getHtdocDescription copied from interface:BasicRestOperations[GET /htdocs/*] - Retrieve static file.- Specified by:
- getHtdocin interface- BasicRestOperations
- Parameters:
- path- The path to retrieve.
- locale- The locale of the HTTP request.
- Returns:
- An HTTP resource representing the static file.
- Throws:
- NotFound
 
- 
getFavIconDescription copied from interface:BasicRestOperations[GET favicon.ico] - Retrieve favorites icon image.- Specified by:
- getFavIconin interface- BasicRestOperations
- Returns:
- A bean containing the contents for the OPTIONS page.
 
- 
errorDescription copied from interface:BasicRestOperations[* /error] - Error occurred.- Specified by:
- errorin interface- BasicRestOperations
 
- 
getStatsDescription copied from interface:BasicRestOperations[GET /stats] - Timing statistics.Timing statistics for method invocations on this resource. - Specified by:
- getStatsin interface- BasicRestOperations
- Parameters:
- req- The HTTP request.
- Returns:
- A collection of timing statistics for each annotated method on this resource.
 
 
-