@Deprecated public enum FacesServletDispatchMethod extends Enum<FacesServletDispatchMethod>
For a guide on FacesViews, please see the package summary.
FacesViews
,
FacesViewsForwardingFilter
Enum Constant and Description |
---|
DO_FILTER
Deprecated.
With this method the
FacesViewsForwardingFilter will use a plain
FilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) to invoke the
FacesServlet . |
FORWARD
Deprecated.
With this method the
FacesViewsForwardingFilter will use a forward to invoke the FacesServlet . |
Modifier and Type | Method and Description |
---|---|
static FacesServletDispatchMethod |
valueOf(String name)
Deprecated.
Returns the enum constant of this type with the specified name.
|
static FacesServletDispatchMethod[] |
values()
Deprecated.
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FacesServletDispatchMethod DO_FILTER
FacesViewsForwardingFilter
will use a plain
FilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
to invoke the
FacesServlet
. Using this method necessitates the FacesServlet to be mapped to the (extensionless)
requested resource or to everything (/*).
The first method is relatively easy using the Servlet 3.0 programmatic registration, but may be troublesome for Servlet 2.5 or manual (declarative) registrations. Mapping the FacesServlet to everything (/*) is not recommenced, and mapping it to a path (/somepath/*) with only Facelets views in it pretty much ruins the entire effect of using FacesViews in the first place.
This is the default value.
public static final FacesServletDispatchMethod FORWARD
FacesViewsForwardingFilter
will use a forward to invoke the FacesServlet
.
Using this method the FacesServlet does not have to be mapped to the (extensionless) requested resource or to
everything (/*).
When forwarding any filters being used by the application do have to be taken into account. Filters defined to be
run AFTER the FacesViewsForwardingFilter will NOT RUN when they are not (also) set to dispatch on
FORWARD
. Filters defined to be run BEFORE the FacesViewsForwardingFilter have to be careful
in what they do; forwarding is defined to clear the existing response buffer.
public static FacesServletDispatchMethod[] values()
for (FacesServletDispatchMethod c : FacesServletDispatchMethod.values()) System.out.println(c);
public static FacesServletDispatchMethod valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2012–2018 OmniFaces. All rights reserved.