Created
August 1, 2011 14:22
-
-
Save bfuster/1118212 to your computer and use it in GitHub Desktop.
custom vraptor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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