Skip to content

Instantly share code, notes, and snippets.

@bfuster
Created August 1, 2011 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bfuster/1118212 to your computer and use it in GitHub Desktop.
Save bfuster/1118212 to your computer and use it in GitHub Desktop.
custom vraptor
package br.com.suaapp.vraptor;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import br.com.caelum.vraptor.VRaptor;
public class CustomVRaptor extends VRaptor {
@Override
public void doFilter(ServletRequest req, ServletResponse res,
FilterChain chain) throws IOException, ServletException {
String uri = ((HttpServletRequest)req).getRequestURI();
if (uri.startsWith("/_ah") || uri.startsWith("/appstats")) {
chain.doFilter(req, res);
} else {
super.doFilter(req, res, chain);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment