public class RedirectFilter extends java.lang.Object implements javax.servlet.Filter
redirect-path that is the application servlet's path
(i.e., "/app"). If no value is specified, then "/app" is used. The path is always relative to the
servlet context, and should always begin with a leading slash.
Filters are only available in Servlet API 2.3 and above.
Servlet API 2.4 is expected to allow a servlets in the welcome list (equivalent to index.html or index.jsp), at which point this filter should no longer be necessary.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REDIRECT_PATH_PARAM |
| Constructor and Description |
|---|
RedirectFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
This filter intercepts the so-called "default" servlet, whose job is to provide access to
standard resources packaged within the web application context.
|
void |
init(javax.servlet.FilterConfig config) |
public static final java.lang.String REDIRECT_PATH_PARAM
public RedirectFilter()
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.Filterpublic void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
doFilter in interface javax.servlet.Filterjava.io.IOExceptionjavax.servlet.ServletException