|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.controller.StripesFilter
public class StripesFilter
The Stripes filter is used to ensure that all requests coming to a Stripes application are handled in the same way. It detects and wraps any requests that contain multipart/form data, so that they may be treated much like any other request. Also ensures that all downstream components have access to essential configuration and services whether the request goes through the dispatcher, or straight to a JSP.
Field Summary | |
---|---|
static String |
CONFIG_CLASS
Key used to lookup the name of the Configuration class used to configure Stripes. |
Constructor Summary | |
---|---|
StripesFilter()
|
Method Summary | |
---|---|
void |
destroy()
Calls the cleanup() method on the log to release resources held by commons logging. |
void |
doFilter(ServletRequest servletRequest,
ServletResponse servletResponse,
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(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(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(FilterConfig filterConfig)
Performs the necessary initialization for the StripesFilter. |
protected StripesRequestWrapper |
wrapRequest(HttpServletRequest servletRequest)
Wraps the HttpServletRequest with a StripesServletRequest. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONFIG_CLASS
Constructor Detail |
---|
public StripesFilter()
Method Detail |
---|
public void init(FilterConfig filterConfig) throws ServletException
init
in interface Filter
ServletException
- thrown if a problem is encountered initializing Stripespublic static Configuration getConfiguration()
public Configuration getInstanceConfiguration()
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException
doFilter
in interface Filter
IOException
ServletException
protected StripesRequestWrapper wrapRequest(HttpServletRequest servletRequest) throws StripesServletException
servletRequest
- the HttpServletRequest handed to the dispatcher by the container
StripesServletException
- if the wrapper cannot be constructedprotected void flashInbound(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(HttpServletRequest req)
public void destroy()
destroy
in interface Filter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |