Class SSIFilter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean allowExec
      When true, allows the exec directive (normally blocked for security).
      protected java.util.regex.Pattern contentTypeRegEx
      Regex pattern to match when evaluating content types for SSI processing.
      protected int debug
      Debug level for this servlet.
      protected java.lang.Long expires
      Expiration time in seconds for the doc.
      protected boolean isVirtualWebappRelative
      When true, virtual paths are interpreted as webapp-relative.
      protected java.util.regex.Pattern shtmlRegEx
      Default pattern for matching SHTML content type.
    • Constructor Summary

      Constructors 
      Constructor Description
      SSIFilter()
      Default constructor.
    • Field Detail

      • debug

        protected int debug
        Debug level for this servlet.
      • expires

        protected java.lang.Long expires
        Expiration time in seconds for the doc.
      • isVirtualWebappRelative

        protected boolean isVirtualWebappRelative
        When true, virtual paths are interpreted as webapp-relative.
      • contentTypeRegEx

        protected java.util.regex.Pattern contentTypeRegEx
        Regex pattern to match when evaluating content types for SSI processing.
      • shtmlRegEx

        protected final java.util.regex.Pattern shtmlRegEx
        Default pattern for matching SHTML content type.
      • allowExec

        protected boolean allowExec
        When true, allows the exec directive (normally blocked for security).
    • Constructor Detail

      • SSIFilter

        public SSIFilter()
        Default constructor.
    • Method Detail

      • init

        public void init()
                  throws ServletException
        Initializes the filter by reading configuration parameters.
        Overrides:
        init in class GenericFilter
        Throws:
        ServletException - If an exception occurs that interrupts the Filter's normal operation
      • doFilter

        public void doFilter​(ServletRequest request,
                             ServletResponse response,
                             FilterChain chain)
                      throws java.io.IOException,
                             ServletException
        Captures the response, processes SSI directives if the content type matches, and writes the output.
        Parameters:
        request - The request to process
        response - The response associated with the request
        chain - Provides access to the next filter in the chain for this filter to pass the request and response to for further processing
        Throws:
        java.io.IOException - if an I/O error occurs during this filter's processing of the request
        ServletException - if the processing fails for any other reason