Class 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 the ServiceLoader framework

    See Also:
    HttpApplication, Serialized Form
    • 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 the HttpApplication.
        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

        public HttpFrameworkServlet​(HttpApplication application,
                                    boolean trustTransactionIdHeader,
                                    Clock clock)
        Creates a new HttpFrameworkServlet programmatically using the specified HttpApplication.
        Parameters:
        application - The HttpApplication instance or null.
        trustTransactionIdHeader - true to trust HTTP request transaction ID headers and false otherwise
        clock - The clock used to create the RequestAuditContext.
    • Method Detail

      • init

        public void init()
                  throws javax.servlet.ServletException
        Overrides:
        init in class javax.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 class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Servlet
        Overrides:
        destroy in class javax.servlet.GenericServlet