Package org.omnifaces.facesviews
Class FacesViewsForwardingFilter
- java.lang.Object
-
- org.omnifaces.filter.HttpFilter
-
- org.omnifaces.facesviews.FacesViewsForwardingFilter
-
- All Implemented Interfaces:
Filter
public class FacesViewsForwardingFilter extends HttpFilter
This filter makes sure extensionless requests arrive at the FacesServlet using an extension on which that Servlet is mapped, and that non-extensionless requests are handled according to a set preference.A filter like this is needed for extensionless requests, since the FacesServlet does not take into account any other mapping than prefix- and extension (suffix) mapping.
For a guide on FacesViews, please see the package summary.
- Author:
- Arjan Tijms
- See Also:
FacesViews
,ExtensionAction
,PathAction
,UriExtensionRequestWrapper
-
-
Constructor Summary
Constructors Constructor Description FacesViewsForwardingFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doFilter(HttpServletRequest request, HttpServletResponse response, HttpSession session, FilterChain chain)
Filter the HTTP request.void
init()
Convenience init() method without FilterConfig parameter which will be called by init(FilterConfig).-
Methods inherited from class org.omnifaces.filter.HttpFilter
destroy, doFilter, getFilterConfig, getInitParameter, getServletContext, init
-
-
-
-
Method Detail
-
init
public void init() throws ServletException
Description copied from class:HttpFilter
Convenience init() method without FilterConfig parameter which will be called by init(FilterConfig).- Overrides:
init
in classHttpFilter
- Throws:
ServletException
- When filter's initialization failed.
-
doFilter
public void doFilter(HttpServletRequest request, HttpServletResponse response, HttpSession session, FilterChain chain) throws ServletException, IOException
Description copied from class:HttpFilter
Filter the HTTP request. The session argument isnull
if there is no session.- Specified by:
doFilter
in classHttpFilter
- Parameters:
request
- The HTTP request.response
- The HTTP response.session
- The HTTP session, if any, elsenull
.chain
- The filter chain to continue.- Throws:
ServletException
- As wrapper exception when something fails in the request processing.IOException
- Whenever something fails at I/O level.- See Also:
Filter.doFilter(ServletRequest, ServletResponse, FilterChain)
-
-