I wonder if there are any good practices for addressing Spring controllers in JSP.
Suppose I have controller:
@Controller
class FooController {
// Don't bother about semantic of this query right now
@RequestMapping("/search/{applicationId}")
public String handleSearch(@PathVariable String applicationId) {
[...]
}
}
Of course in JSP I can write:
<c:url value="/search/${application.id}" />
But it's very hard to change url then. If you familiar with Rails/Grails then you now how this problem resolved:
redirect_to(:controller => 'foo', :action = 'search')
But in Spring there is so much UrlMappers. Each UrlMapper have own semantic and binding scheme. Rails alike scheme simply doesn't work (unless you implement it yourself). And my question is: are there any more convenient ways to address controller from JSP in Spring?