Class SSIFilter

java.lang.Object
jakarta.servlet.GenericFilter
org.apache.catalina.ssi.SSIFilter
All Implemented Interfaces:
Filter, FilterConfig, Serializable

public class SSIFilter extends GenericFilter
Filter to process SSI requests within a webpage. Mapped to a content types from within web.xml.
See Also:
  • Field Details

    • debug

      protected int debug
      Debug level for this servlet.
    • expires

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

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

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

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

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

    • SSIFilter

      public SSIFilter()
      Default constructor.
  • Method Details

    • 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 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:
      IOException - if an I/O error occurs during this filter's processing of the request
      ServletException - if the processing fails for any other reason