public class CommittedResponseHtmlErrorRecoveryFilter extends Object implements javax.servlet.Filter
Our current strategy is to: 1. pre-render the standard error page HTML 2. wrap pre-rendered page in some magic javascript 3. dump the result into the middle of the response outputstream
We hope that the browser will execute the aforementioned magic javascript as soon as it sees it, which will destroy and re-render the page client-side with the HTML we generated in (1.) above.
We must hope the user is a human that pays attention to what we're rendering, not a machine that pays attention to the HTTP status code we've already transmitted (most likely 200 OK.)
Modifier and Type | Field and Description |
---|---|
static String |
ENABLE_COMMITTED_RESPONSE_HTML_ERROR_RECOVERY |
Constructor and Description |
---|
CommittedResponseHtmlErrorRecoveryFilter() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain) |
void |
init(javax.servlet.FilterConfig filterConfig) |
public static final String ENABLE_COMMITTED_RESPONSE_HTML_ERROR_RECOVERY
public CommittedResponseHtmlErrorRecoveryFilter()
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
IOException
javax.servlet.ServletException
Copyright © 2002-2019 Atlassian. All Rights Reserved.