2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

add multiple mvc controllers for my maven project

In my Spring MVC project,I need to add multiple controllers  which only has one right now. My current project only has one Spring Dispatcher in the web.xml and it maps the <url-pattern>/</url-pattern> to the "/" of the controller"s @RequestMapping(value = "/") controller request mapping. Because everything is in the web.xml and there are no other xml files that do any dispatcher mapping, should I not be able to just add a new <url-pattern>/</url-pattern> with a different controller pattern to the web.xml?

 



userimage
use /* to forward all requests to the spring dispatcher and the use any request mapping in your controllers
Answer is