testServlet
/test/*
<
my setup usually looks like this:
testServlet
/
controller, where i assume you want to handle /test and /test/ equally:
@Controller
public class MyController {
@RequestMapping("/test")
public String test() {
return "redirect:/welcome";
}
@RequestMapping("/test/")
public String test() {
return "redirect:/welcome";
}
@RequestMapping("/welcome")
public void test(ModelMap model) {
// do your stuff
}
}
setup like this would cause DispatcherServlet to handle requests for *.css and *.js files, which is not desired in most cases. i think this is the problem Bhavik describes. For those resources you can you the ResourceController like this:
files from /resources/css and /resources/js will be served without forcing you to write a extra controller.