How to build reverse mapping URLs inside JSP using spring mvc router? -
i'm using spring-mvc-router have urls in centralized location. how can make reverse mapping of controllers inside jsp files?
it's described in readme page of project, section integrating jsp:
in jsp, declare taglib:
<%@ taglib prefix="route" uri="/springmvc-router" %>
then use reverse method generate urls:
<a href="<route:reverse action="usercontroller.listall" />">list users</a>
dynamic parameters can used:
<a href="<route:reverse action="usercontroller.showuser" userid="42" />">show user 42</a>
Comments
Post a Comment