Announcement Announcement Module
Collapse
No announcement yet.
Path parameters in Spring MVC 3 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Path parameters in Spring MVC 3

    Is it possible to: set a URI template in the mvc:view-controller element of the *-servlet.xml file and then use that path parameter in a jsp (alternatively, is there another method with the same result)? An example follows:

    *-servlet.xml file
    Code:
    <beans...>
    <mvc:view-controller path="/login" view-name="login"/>
    <mvc:view-controller path="/login/{error}" view-name="login"/>
    </beans>
    login.jsp file
    Code:
    <c:if test="${not empty param['error']}">
    <span class="error">You have an error...</span>
    </c:if>
Working...
X