* @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
*/
public void doFilter(ServletRequest pRequest, ServletResponse pResponse, FilterChain pChain) throws IOException, ServletException {
try {
HttpServletResponse oResponse = wrapResponse((HttpServletResponse) pResponse, (HttpServletRequest) pRequest);
HttpContextFacade oFacade = new HttpContextFacade(mServletContext, (HttpServletRequest) pRequest, oResponse);
try {
if (mLogger.isDebugEnabled()) mLogger.debug("Filtering request with Rewriter...");
mEngine.rewrite(oFacade);
} catch (RewriteException e) {
mLogger.fatal("Error rewriting url.", e);