public class NutFilter
extends java.lang.Object
implements javax.servlet.Filter
| 限定符和类型 | 字段和说明 |
|---|---|
protected java.util.Set<java.lang.String> |
exclusionPaths
需要排除的固定路径
|
protected java.util.regex.Pattern |
exclusionsPrefix
需要排除的路径前缀
|
protected java.util.regex.Pattern |
exclusionsSuffix
需要排除的后缀名
|
protected ActionHandler |
handler |
protected static java.lang.String |
IGNORE |
protected java.util.regex.Pattern |
ignorePtn |
protected static Log |
log |
protected javax.servlet.ServletContext |
sc |
protected java.lang.String |
selfName |
protected SessionProvider |
sp |
| 构造器和说明 |
|---|
NutFilter() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
_init(javax.servlet.FilterConfig conf) |
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp,
javax.servlet.FilterChain chain) |
void |
init(javax.servlet.FilterConfig conf) |
protected boolean |
isExclusion(java.lang.String matchUrl)
过滤请求.
|
protected void |
nextChain(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
javax.servlet.FilterChain chain) |
protected static Log log
protected ActionHandler handler
protected static final java.lang.String IGNORE
protected java.util.regex.Pattern ignorePtn
protected java.lang.String selfName
protected SessionProvider sp
protected java.util.regex.Pattern exclusionsPrefix
protected java.util.regex.Pattern exclusionsSuffix
protected java.util.Set<java.lang.String> exclusionPaths
protected javax.servlet.ServletContext sc
public void init(javax.servlet.FilterConfig conf)
throws javax.servlet.ServletException
init 在接口中 javax.servlet.Filterjavax.servlet.ServletExceptionpublic void _init(javax.servlet.FilterConfig conf)
throws javax.servlet.ServletException
javax.servlet.ServletExceptionpublic void destroy()
destroy 在接口中 javax.servlet.Filterprotected boolean isExclusion(java.lang.String matchUrl)
throws java.io.IOException,
javax.servlet.ServletException
matchUrl - 待匹配URLjava.io.IOException - 不太可能抛出javax.servlet.ServletException - 不太可能抛出public void doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
doFilter 在接口中 javax.servlet.Filterjava.io.IOExceptionjavax.servlet.ServletExceptionprotected void nextChain(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
java.io.IOExceptionjavax.servlet.ServletException