@Test public void returnsFalseForNonStaticResources() throws Exception { File file = new File("_test_unknown.xml"); String key = file.getAbsolutePath(); when(request.getRequestURI()).thenReturn("/contextName/" +key); when(request.getContextPath()).thenReturn("/contextName/"); when(context.getResource(key)).thenReturn(null); boolean result = new DefaultStaticContentHandler(context).requestingStaticFile(request); assertThat(result, is(equalTo(false))); }
public boolean requestingStaticFile(HttpServletRequest request) throws MalformedURLException { URL resourceUrl = context.getResource(uriRelativeToContextRoot(request)); return resourceUrl != null && isAFile(resourceUrl); }
DefaultStaticContentHandler implements StaticContentHandler { public boolean requestingStaticFile(HttpServletRequest request) throws MalformedURLException { URL resourceUrl = context.getResource(uriRelativeToContextRoot(request)); return resourceUrl != null && isAFile(resourceUrl); } }
DefaultStaticContentHandler implements StaticContentHandler { public boolean requestingStaticFile(HttpServletRequest request) throws MalformedURLException { URL resourceUrl = context.getResource(uriRelativeToContextRoot(request)); return resourceUrl != null && isAFile(resourceUrl); } DefaultStaticContentHandler(ServletContext context); }
DefaultStaticContentHandler implements StaticContentHandler { public boolean requestingStaticFile(HttpServletRequest request) throws MalformedURLException { URL resourceUrl = context.getResource(uriRelativeToContextRoot(request)); return resourceUrl != null && isAFile(resourceUrl); } DefaultStaticContentHandler(ServletContext context); boolean requestingStaticFile(HttpServletRequest request); void deferProcessingToContainer(FilterChain filterChain, HttpServletRequest request,
			HttpServletResponse response); }
DefaultStaticContentHandler implements StaticContentHandler { public boolean requestingStaticFile(HttpServletRequest request) throws MalformedURLException { URL resourceUrl = context.getResource(uriRelativeToContextRoot(request)); return resourceUrl != null && isAFile(resourceUrl); } DefaultStaticContentHandler(ServletContext context); boolean requestingStaticFile(HttpServletRequest request); void deferProcessingToContainer(FilterChain filterChain, HttpServletRequest request,
			HttpServletResponse response);  }