|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.lagarto.filter.LagartoServletFilter
public abstract class LagartoServletFilter
Lagarto servlet filter takes HTML content and invokes user defined parser on it. This filter is a generic one and does not use Lagarto parser explicitly. It just gives a placeholder where user can add it's own parsing mechanism.
| Constructor Summary | |
|---|---|
LagartoServletFilter()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LagartoServletFilter()
| Method Detail |
|---|
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionpublic 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.Filterjava.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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||