|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.protocol.http.WicketFilter
public class WicketFilter
Filter for initiating handling of Wicket requests.
The advantage of a filter is that, unlike a servlet, it can choose not to process the request and let whatever is next in chain try. So when using a Wicket filter and a request comes in for foo.gif the filter can choose not to process it because it knows it is not a wicket-related request. Since the filter didn't process it, it falls on to the application server to try, and then it works."
for documentation
Field Summary | |
---|---|
static java.lang.String |
APP_FACT_PARAM
The name of the context parameter that specifies application factory class |
static java.lang.String |
FILTER_MAPPING_PARAM
The name of the root path parameter that specifies the root dir of the app. |
Constructor Summary | |
---|---|
WicketFilter()
|
Method Summary | |
---|---|
protected java.lang.String |
checkIfRedirectRequired(java.lang.String requestURI,
java.lang.String contextPath)
Try to determine as fast as possible if a redirect is necessary |
void |
destroy()
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
|
protected IWebApplicationFactory |
getApplicationFactory()
Creates the web application factory instance. |
protected java.lang.ClassLoader |
getClassLoader()
|
javax.servlet.FilterConfig |
getFilterConfig()
|
protected java.lang.String |
getFilterPath(javax.servlet.http.HttpServletRequest request)
Either get the filterPath retrieved from web.xml, or if not found the old (1.3) way via a filter mapping param. |
void |
init(boolean isServlet,
javax.servlet.FilterConfig filterConfig)
Servlets and Filters are treated essentially the same with Wicket. |
void |
init(javax.servlet.FilterConfig filterConfig)
If you do have a need to subclass, you may subclass init(boolean, FilterConfig) |
void |
setFilterPath(java.lang.String filterPath)
Sets the filter path instead of reading it from web.xml. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FILTER_MAPPING_PARAM
public static final java.lang.String APP_FACT_PARAM
Constructor Detail |
---|
public WicketFilter()
Method Detail |
---|
protected java.lang.ClassLoader getClassLoader()
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.Filter
java.io.IOException
javax.servlet.ServletException
Filter.doFilter(javax.servlet.ServletRequest,
javax.servlet.ServletResponse, javax.servlet.FilterChain)
protected IWebApplicationFactory getApplicationFactory()
ContextParamWebApplicationFactory
public final void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init(boolean, FilterConfig)
init
in interface javax.servlet.Filter
javax.servlet.ServletException
Filter.init(javax.servlet.FilterConfig)
public void init(boolean isServlet, javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
isServlet
- True if Servlet, false of FilterfilterConfig
-
javax.servlet.ServletException
init(FilterConfig)
public javax.servlet.FilterConfig getFilterConfig()
protected java.lang.String getFilterPath(javax.servlet.http.HttpServletRequest request)
request
-
public void destroy()
destroy
in interface javax.servlet.Filter
Filter.destroy()
protected final java.lang.String checkIfRedirectRequired(java.lang.String requestURI, java.lang.String contextPath)
requestURI
- contextPath
-
public final void setFilterPath(java.lang.String filterPath)
filterPath
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |