public class StripesFilter
extends java.lang.Object
implements javax.servlet.Filter
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONFIG_CLASS
Key used to lookup the name of the Configuration class used to configure Stripes.
|
| Constructor and Description |
|---|
StripesFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Calls the cleanup() method on the log to release resources held by commons logging.
|
void |
doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
Performs the primary work of the filter, including constructing a StripesRequestWrapper to
wrap the HttpServletRequest, and using the configured LocalePicker to decide which
Locale will be used to process the request.
|
protected void |
flashInbound(javax.servlet.http.HttpServletRequest req)
Checks to see if there is a flash scope identified by a parameter to the current
request, and if there is, retrieves items from the flash scope and moves them
back to request attributes.
|
protected void |
flashOutbound(javax.servlet.http.HttpServletRequest req)
Manages the work that ensures that flash scopes get cleaned up properly when
requests go missing.
|
static Configuration |
getConfiguration()
Returns the Configuration that is being used to process the current request.
|
Configuration |
getInstanceConfiguration()
Returns the configuration for this instance of the StripesFilter for any class
that has a reference to the filter.
|
void |
init(javax.servlet.FilterConfig filterConfig)
Performs the necessary initialization for the StripesFilter.
|
protected StripesRequestWrapper |
wrapRequest(javax.servlet.http.HttpServletRequest servletRequest)
Wraps the HttpServletRequest with a StripesServletRequest.
|
public static final java.lang.String CONFIG_CLASS
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletException - thrown if a problem is encountered initializing Stripespublic static Configuration getConfiguration()
public Configuration getInstanceConfiguration()
public void doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
throws java.io.IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.Filterjava.io.IOExceptionjavax.servlet.ServletExceptionprotected StripesRequestWrapper wrapRequest(javax.servlet.http.HttpServletRequest servletRequest) throws StripesServletException
servletRequest - the HttpServletRequest handed to the dispatcher by the containerStripesServletException - if the wrapper cannot be constructedprotected void flashInbound(javax.servlet.http.HttpServletRequest req)
Checks to see if there is a flash scope identified by a parameter to the current request, and if there is, retrieves items from the flash scope and moves them back to request attributes.
protected void flashOutbound(javax.servlet.http.HttpServletRequest req)
public void destroy()
destroy in interface javax.servlet.Filter? Copyright 2005-2006, Stripes Development Team.