Background:
The project uses the SPRINGMVC management request, has a small need, enters the domain name automatically when enters a page (or automatically initiates a request).
Process:
1, first think of the way to configure Welcome-file-list in Web. XML, after filling in a restful address here, access to the domain name discovery did not jump to the target page (the method failed)
< web:welcome-file-list > < Web:welcome-file >xx/xxx</ Web:welcome-file > </ web:welcome-file-list >
2, think of is not can configure a @RequestMapping ({"", "Xx/xxx"}), let the corresponding method map empty path, test result is jetty container under can, Tomcat container not.
3, the Final Solution , add the following configuration to the Spring-mvc.xml file to test the problem resolution
<path= "/" view-name= "redirect:/xx/xxx"/>
Spring MVC settings How to set the default home page