Package org.forgerock.http.servlet
Class HttpFrameworkServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.forgerock.http.servlet.HttpFrameworkServlet
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public final class HttpFrameworkServlet extends javax.servlet.http.HttpServletAn HTTP servlet implementation which provides integration between the Servlet API and the common HTTP Framework.
A
HttpApplicationimplementation must be registered in theServiceLoaderframework- See Also:
HttpApplication, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringPRESERVE_ORIGINAL_QUERY_STRING_INIT_PARAMServlet init-param for configuring how strict CHF is in regard to invalid characters in query string.static StringROUTING_BASE_INIT_PARAM_NAMEServlet init-param for configuring the routing base for theHttpApplication.
-
Constructor Summary
Constructors Constructor Description HttpFrameworkServlet()Default constructor for use via web.xml declaration.HttpFrameworkServlet(HttpApplication application)Deprecated.Replaced byHttpFrameworkServlet(HttpApplication, boolean, Clock), which explicitly sets thetrustTransactionIdHeaderfield and theClockto use.HttpFrameworkServlet(HttpApplication application, boolean trustTransactionIdHeader)Deprecated.Replaced byHttpFrameworkServlet(HttpApplication, boolean, Clock)which does not rely on the systemClockanymore.HttpFrameworkServlet(HttpApplication application, boolean trustTransactionIdHeader, Clock clock)Creates a newHttpFrameworkServletprogrammatically using the specifiedHttpApplication.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()voidinit()protected voidservice(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
-
-
-
-
Field Detail
-
ROUTING_BASE_INIT_PARAM_NAME
public static final String ROUTING_BASE_INIT_PARAM_NAME
Servlet init-param for configuring the routing base for theHttpApplication.- See Also:
ServletRoutingBase, Constant Field Values
-
PRESERVE_ORIGINAL_QUERY_STRING_INIT_PARAM
public static final String PRESERVE_ORIGINAL_QUERY_STRING_INIT_PARAM
Servlet init-param for configuring how strict CHF is in regard to invalid characters in query string.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HttpFrameworkServlet
public HttpFrameworkServlet()
Default constructor for use via web.xml declaration.
-
HttpFrameworkServlet
@Deprecated public HttpFrameworkServlet(HttpApplication application)
Deprecated.Replaced byHttpFrameworkServlet(HttpApplication, boolean, Clock), which explicitly sets thetrustTransactionIdHeaderfield and theClockto use.Creates a newHttpFrameworkServletprogrammatically using the specifiedHttpApplication.- Parameters:
application- TheHttpApplicationinstance ornull.
-
HttpFrameworkServlet
@Deprecated(since="26.2.0") public HttpFrameworkServlet(HttpApplication application, boolean trustTransactionIdHeader)
Deprecated.Replaced byHttpFrameworkServlet(HttpApplication, boolean, Clock)which does not rely on the systemClockanymore.Creates a newHttpFrameworkServletprogrammatically using the specifiedHttpApplicationand theClock.systemUTC()clock.- Parameters:
application- TheHttpApplicationinstance ornull.trustTransactionIdHeader-trueto trust HTTP request transaction ID headers andfalseotherwise
-
HttpFrameworkServlet
public HttpFrameworkServlet(HttpApplication application, boolean trustTransactionIdHeader, Clock clock)
Creates a newHttpFrameworkServletprogrammatically using the specifiedHttpApplication.- Parameters:
application- TheHttpApplicationinstance ornull.trustTransactionIdHeader-trueto trust HTTP request transaction ID headers andfalseotherwiseclock- The clock used to create theRequestAuditContext.
-
-
Method Detail
-
init
public void init() throws javax.servlet.ServletException- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
service
protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException- Overrides:
servicein classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
destroy
public void destroy()
- Specified by:
destroyin interfacejavax.servlet.Servlet- Overrides:
destroyin classjavax.servlet.GenericServlet
-
-