faux switch

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@37 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2009-03-29 10:01:14 +00:00
parent 45fae7c64c
commit d6f2a290d3
1 changed files with 5 additions and 4 deletions

View File

@ -13,19 +13,18 @@ import javax.servlet.ServletResponse;
public class ContinuationFilter implements Filter
{
final boolean _jetty=true;
boolean _faux;
ServletContext _context;
public void init(FilterConfig filterConfig) throws ServletException
{
_context = filterConfig.getServletContext();
_faux=!"org.eclipse.jetty.servlet".equals(filterConfig.getClass().getPackage().getName());
}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
{
if (_jetty)
chain.doFilter(request,response);
else
if (_faux)
{
final FauxContinuation fc = new FauxContinuation();
request.setAttribute(Continuation.ATTRIBUTE,fc);
@ -51,6 +50,8 @@ public class ContinuationFilter implements Filter
}
}
}
else
chain.doFilter(request,response);
}
public void destroy()