Class SSIFilter
java.lang.Object
jakarta.servlet.GenericFilter
org.apache.catalina.ssi.SSIFilter
- All Implemented Interfaces:
Filter, FilterConfig, Serializable
Filter to process SSI requests within a webpage. Mapped to a content types from within web.xml.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhen true, allows the exec directive (normally blocked for security).protected PatternRegex pattern to match when evaluating content types for SSI processing.protected intDebug level for this servlet.protected LongExpiration time in seconds for the doc.protected booleanWhen true, virtual paths are interpreted as webapp-relative.protected final PatternDefault pattern for matching SHTML content type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoFilter(ServletRequest request, ServletResponse response, FilterChain chain) Captures the response, processes SSI directives if the content type matches, and writes the output.voidinit()Initializes the filter by reading configuration parameters.Methods inherited from class GenericFilter
getFilterConfig, getFilterName, getInitParameter, getInitParameterNames, getServletContext, init
-
Field Details
-
debug
protected int debugDebug level for this servlet. -
expires
Expiration time in seconds for the doc. -
isVirtualWebappRelative
protected boolean isVirtualWebappRelativeWhen true, virtual paths are interpreted as webapp-relative. -
contentTypeRegEx
Regex pattern to match when evaluating content types for SSI processing. -
shtmlRegEx
Default pattern for matching SHTML content type. -
allowExec
protected boolean allowExecWhen true, allows the exec directive (normally blocked for security).
-
-
Constructor Details
-
SSIFilter
public SSIFilter()Default constructor.
-
-
Method Details
-
init
Initializes the filter by reading configuration parameters.- Overrides:
initin classGenericFilter- 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 processresponse- The response associated with the requestchain- 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 requestServletException- if the processing fails for any other reason
-