AppEngineStaticContentHandler extends DefaultStaticContentHandler { @Override public boolean requestingStaticFile(HttpServletRequest request) throws MalformedURLException { if (request.getRequestURI().startsWith(request.getContextPath() + "/_ah")) { logger.debug("Requesting appEngine config URI: {}. Bypassing VRaptor", request.getRequestURI()); return true; } return super.requestingStaticFile(request); } AppEngineStaticContentHandler(ServletContext context); @Override boolean requestingStaticFile(HttpServletRequest request);  }
@Test public void shouldIgnoreAdminPages() throws Exception { when(request.getContextPath()).thenReturn(""); when(request.getRequestURI()).thenReturn("/_ah/jobs"); assertThat(handler.requestingStaticFile(request), is(true)); }
@Test public void shouldExecuteNonAdminPages() throws Exception { when(request.getContextPath()).thenReturn(""); when(request.getRequestURI()).thenReturn("/my/uri"); assertThat(handler.requestingStaticFile(request), is(false)); }