|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.scooterframework.web.controller.ScooterRequestFilter
public class ScooterRequestFilter
ScooterRequestFilter can be attached to either an individual servlet or to a URL pattern. This filter performs the following functions:
The following parameters are allowed to configure this filter in web.xml:
Examples:
excluded_paths: /images, /javascripts, /layouts, /stylesheets, /css
encoding: UTF-8
| Field Summary | |
|---|---|
protected java.lang.String |
encoding
Character encoding to be used. |
protected java.lang.String |
excludedPaths
Directory paths that we want this filter to skip. |
protected LogUtil |
log
|
| Constructor Summary | |
|---|---|
ScooterRequestFilter()
|
|
| Method Summary | |
|---|---|
protected void |
clearCachedRequestData()
Cleans up all local cached data to prepare for the next request. |
void |
destroy()
Take this filter out of service. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Time the processing that is performed by all subsequent filters in the current filter stack, including the ultimately invoked servlet. |
protected java.lang.String |
getRequestMethod(javax.servlet.http.HttpServletRequest request)
Returns the method of the request. |
protected java.lang.String |
getRequestPath(javax.servlet.http.HttpServletRequest request)
Returns request path of the HttpServletRequest request. |
void |
init(javax.servlet.FilterConfig filterConfig)
Place this filter into service. |
protected void |
initializeActionContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected boolean |
isAjaxRequest(javax.servlet.http.HttpServletRequest request)
|
protected boolean |
isFileUploadRequest(javax.servlet.http.HttpServletRequest request)
|
protected boolean |
isLocalRequest(javax.servlet.http.HttpServletRequest request)
|
protected boolean |
isStaticContentRequest(javax.servlet.http.HttpServletRequest request)
|
protected void |
otherInit()
|
protected java.lang.String |
requestInfo(boolean skipStatic,
javax.servlet.http.HttpServletRequest request)
|
protected boolean |
skippedRequestPath(javax.servlet.http.HttpServletRequest request)
Checks if a request path must be skipped. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String excludedPaths
protected java.lang.String encoding
protected LogUtil log
| Constructor Detail |
|---|
public ScooterRequestFilter()
| Method Detail |
|---|
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.FilterfilterConfig - The filter configuration object
javax.servlet.ServletExceptionprotected void otherInit()
public void destroy()
destroy in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.Filterrequest - The servlet request we are processingchain - The filter chain we are processing
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet error occursprotected boolean isStaticContentRequest(javax.servlet.http.HttpServletRequest request)
protected java.lang.String requestInfo(boolean skipStatic,
javax.servlet.http.HttpServletRequest request)
protected java.lang.String getRequestPath(javax.servlet.http.HttpServletRequest request)
request - HttpServletRequest
protected java.lang.String getRequestMethod(javax.servlet.http.HttpServletRequest request)
protected boolean isAjaxRequest(javax.servlet.http.HttpServletRequest request)
protected void clearCachedRequestData()
protected void initializeActionContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
protected boolean skippedRequestPath(javax.servlet.http.HttpServletRequest request)
request -
protected boolean isLocalRequest(javax.servlet.http.HttpServletRequest request)
protected boolean isFileUploadRequest(javax.servlet.http.HttpServletRequest request)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||