Class RequestWrapperFilter
java.lang.Object
javax.servlet.GenericFilter
javax.servlet.http.HttpFilter
org.deltava.servlet.filter.RequestWrapperFilter
- All Implemented Interfaces:
Serializable
,Filter
,FilterConfig
A servlet filter to wrap HTTP servlet requests with a custom wrapper. This filter will also extract cookies into servlet request attributes.
- Since:
- 1.0
- Version:
- 11.6
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
void
doFilter
(HttpServletRequest req, HttpServletResponse rsp, FilterChain fc) Called by the servlet container on each request.void
init
(FilterConfig cfg) Methods inherited from class javax.servlet.http.HttpFilter
doFilter
Methods inherited from class javax.servlet.GenericFilter
getFilterConfig, getFilterName, getInitParameter, getInitParameterNames, getServletContext, init
-
Constructor Details
-
RequestWrapperFilter
public RequestWrapperFilter()
-
-
Method Details
-
init
- Specified by:
init
in interfaceFilter
- Overrides:
init
in classGenericFilter
- Throws:
ServletException
-
doFilter
public void doFilter(HttpServletRequest req, HttpServletResponse rsp, FilterChain fc) throws IOException, ServletException Called by the servlet container on each request. Wraps the request with a custom wrapper.- Overrides:
doFilter
in classHttpFilter
- Parameters:
req
- the requestrsp
- the responsefc
- the Filter Chain- Throws:
IOException
- if an I/O error occursServletException
- if a general error occurs
-
destroy
public void destroy()
-