@Test public void testResourceInContext() throws ServletException, IOException { MockServletContext context = new MockServletContext(); MockHttpServletRequest request = new MockHttpServletRequest(context); request.setServletPath("/org"); request.setPathInfo("/org/geomajas/gwt/server/mvc/geomajas_logo.png"); request.setMethod("GET"); MockHttpServletResponse response = new MockHttpServletResponse(); GwtResourceController resourceController = new GwtResourceController(); resourceController.setServletContext(context); resourceController.getResource(request, response); Resource resource = new ClassPathResource("/org/geomajas/gwt/server/mvc/geomajas_logo.png"); Assert.assertArrayEquals(IOUtils.toByteArray(resource.getInputStream()), response.getContentAsByteArray()); }
@RequestMapping(value = "*", method = RequestMethod.GET) public void getResource(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { super.getResource(request, response); }
GwtResourceController extends ResourceController { @RequestMapping(value = "*", method = RequestMethod.GET) public void getResource(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { super.getResource(request, response); } }
GwtResourceController extends ResourceController { @RequestMapping(value = "*", method = RequestMethod.GET) public void getResource(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { super.getResource(request, response); } GwtResourceController(); }
GwtResourceController extends ResourceController { @RequestMapping(value = "*", method = RequestMethod.GET) public void getResource(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { super.getResource(request, response); } GwtResourceController(); @RequestMapping(value = "/**/*", method = RequestMethod.GET) void getResource(HttpServletRequest request, HttpServletResponse response); }
GwtResourceController extends ResourceController { @RequestMapping(value = "*", method = RequestMethod.GET) public void getResource(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { super.getResource(request, response); } GwtResourceController(); @RequestMapping(value = "/**/*", method = RequestMethod.GET) void getResource(HttpServletRequest request, HttpServletResponse response);  }