Announcement Announcement Module
Collapse
No announcement yet.
how to use JSTl tags with spring tags Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to use JSTl tags with spring tags

    Hi I wanted to know if there is a way to include the jstl tags within spring form tags.

    what I wanted to do is - based on a attribute i set, I want to disable or enable a input element.



    This is the code in the jsp
    Code:
    <c:set var="isSecure" value="${commandPollBean.pollTO.securePoll}" />
    
    <form:input path="pollTO.minEntriesToDisplayResult" id="minEntriesToDisplayResult" size="1" cssErrorClass="errors" 
                      <c:if test="${isSecure}">disabled</c:if>
                    />
    This is the exception I get when I do this.
    Code:
    javax.servlet.jsp.JspException: ServletException while including page.
    Is there a way to do this kind of logic ?

    Thanks.

  • #2
    found the way of doing it

    Ok
    I guess you cannot use JSTl tags with spring form tags

    And this the way I resovled my issue - putting the code here , in case anyone else is looking to do the similar thing.

    Code:
    <form:input path="pollTO.minEntriesToDisplayResult" id="minEntriesToDisplayResult" size="1" cssErrorClass="errors" disabled="${isSecure}"/>

    Comment

    Working...
    X