May 16th, 2011, 03:37 PM
How can I create a link to a controller and action from a JSP in Spring MVC?
I am using Spring MVC 3.0
I have a guestbook.jsp page where I want to create a link that points to GuestBookController's login method.
I don't want to hardcore the url (e.g /guestbook/login) but rather would like to have the url generated based on controller and action method specified.
This is a simple task that most web frameworks handle (e.g grails does it with g:link tag) but I couldn't find any documentation on this in the official Spring MVC docs.
So I am scratching my head - Is this functionality in some tag library? Does the framework expose it? Do I have to extend the framework to get this to work?
Last edited by zenmonkey; May 16th, 2011 at 04:02 PM.
Tags for this Thread