public abstract class LagartoServletFilter
extends java.lang.Object
implements javax.servlet.Filter
Constructor and Description |
---|
LagartoServletFilter() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptActionPath(javax.servlet.http.HttpServletRequest request,
java.lang.String actionPath)
Accepts action path for further parsing.
|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
Wraps the response and parse it using Lagarto parser.
|
void |
init(javax.servlet.FilterConfig filterConfig) |
protected abstract char[] |
parse(char[] content,
javax.servlet.http.HttpServletRequest request)
Main method that parses content.
|
protected boolean |
processActionPath(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
java.lang.String actionPath)
Manually process the action path and returns
true if path is consumed. |
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain) throws java.io.IOException, javax.servlet.ServletException
processActionPath(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, String)
to optionally consumes path, then acceptActionPath(javax.servlet.http.HttpServletRequest, String)
to
check if path is accepted for processing.doFilter
in interface javax.servlet.Filter
java.io.IOException
javax.servlet.ServletException
protected boolean processActionPath(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, java.lang.String actionPath) throws java.io.IOException
true
if path is consumed.
When path is consumed, filter chain is not continued.
By default, it returns false
.java.io.IOException
protected boolean acceptActionPath(javax.servlet.http.HttpServletRequest request, java.lang.String actionPath)
*.htm(l)
requests are passed through and those without any extension.protected abstract char[] parse(char[] content, javax.servlet.http.HttpServletRequest request)
Copyright © 2003-present Jodd Team