Dear friends,
I'm new of the Spring and i'm developing the my first application with MVC.
I have two controllers, homeController wich contains two methods
and the RegistrationControllerCode:@Controller @RequestMapping("/") public String showHomePage(Map<String,Object> model){} @RequestMapping(value="/categories/{nameCategoria}", method=RequestMethod.GET){ return "homePage"} public String showCategoriesPage(){return "CategoryPage"}
In the my HomePage i have a two linksCode:@Controller @RequestMapping("/registration") public class RegistrationController{ @RequestMapping(method=RequestMethod.GET , params="newUser") public String createNewUser(Model model){ return RegistrationPage } }
if i click first on link categories I will return /categories/nameCategoria url Up to here everything is ok, but if after i click on registration link i will return /categories/registration?newUser but it's a bad url for the my RegistrationController,Code:<div align="justify"> <a href="registration?newUser" style="color: blue;">registration</a> <a href="/categories/nameCategoria" > categories</a> </div>
while if i click first on registration link, i will return /registration?newUser url which is a sound url for the my RegistrationController
How can i resolve this problem?


Reply With Quote