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.HttpServlet
An HTTP servlet implementation which provides integration between the Servlet API and the common HTTP Framework.
A
HttpApplication
implementation must be registered in theServiceLoader
framework- See Also:
HttpApplication
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
PRESERVE_ORIGINAL_QUERY_STRING_INIT_PARAM
Servlet init-param for configuring how strict CHF is in regard to invalid characters in query string.static String
ROUTING_BASE_INIT_PARAM_NAME
Servlet 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 thetrustTransactionIdHeader
field and theClock
to use.HttpFrameworkServlet(HttpApplication application, boolean trustTransactionIdHeader)
Deprecated.Replaced byHttpFrameworkServlet(HttpApplication, boolean, Clock)
which does not rely on the systemClock
anymore.HttpFrameworkServlet(HttpApplication application, boolean trustTransactionIdHeader, Clock clock)
Creates a newHttpFrameworkServlet
programmatically using the specifiedHttpApplication
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
init()
protected void
service(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 thetrustTransactionIdHeader
field and theClock
to use.Creates a newHttpFrameworkServlet
programmatically using the specifiedHttpApplication
.- Parameters:
application
- TheHttpApplication
instance 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 systemClock
anymore.Creates a newHttpFrameworkServlet
programmatically using the specifiedHttpApplication
and theClock.systemUTC()
clock.- Parameters:
application
- TheHttpApplication
instance ornull
.trustTransactionIdHeader
-true
to trust HTTP request transaction ID headers andfalse
otherwise
-
HttpFrameworkServlet
public HttpFrameworkServlet(HttpApplication application, boolean trustTransactionIdHeader, Clock clock)
Creates a newHttpFrameworkServlet
programmatically using the specifiedHttpApplication
.- Parameters:
application
- TheHttpApplication
instance ornull
.trustTransactionIdHeader
-true
to trust HTTP request transaction ID headers andfalse
otherwiseclock
- The clock used to create theRequestAuditContext
.
-
-
Method Detail
-
init
public void init() throws javax.servlet.ServletException
- Overrides:
init
in 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:
service
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejavax.servlet.Servlet
- Overrides:
destroy
in classjavax.servlet.GenericServlet
-
-