com.jivesoftware.webchat
Class ErrorCatchingFilter
java.lang.Object
com.jivesoftware.webchat.ErrorCatchingFilter
- All Implemented Interfaces:
- javax.servlet.Filter
public class ErrorCatchingFilter
- extends java.lang.Object
- implements javax.servlet.Filter
Field Summary |
static java.lang.String |
ERROR
|
Method Summary |
void |
destroy()
Does nothing. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Wraps all calls to the filter chain with a try/catch. |
void |
init(javax.servlet.FilterConfig config)
Loads the error page to redirect to. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERROR
public static final java.lang.String ERROR
- See Also:
- Constant Field Values
ErrorCatchingFilter
public ErrorCatchingFilter()
init
public void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
- Loads the error page to redirect to. Param is named "errorPage". If parameter is
not found a ServletException will be thrown.
- Specified by:
init
in interface javax.servlet.Filter
- Throws:
javax.servlet.ServletException
doFilter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
- Wraps all calls to the filter chain with a try/catch. Any throwables caught are
put into the request with the attribute name of
ERROR
. Control is then
redirected to the JSP page specified in init(javax.servlet.FilterConfig)
.
- Specified by:
doFilter
in interface javax.servlet.Filter
- Throws:
java.io.IOException
javax.servlet.ServletException
destroy
public void destroy()
- Does nothing.
- Specified by:
destroy
in interface javax.servlet.Filter
Copyright © 1999-2006 Jive Software.