Announcement Announcement Module
Collapse
No announcement yet.
<form:errors /> not working Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • <form:errors /> not working

    Hi

    I have a jsp in which I am including several other jsps as follows :
    Code:
    <form:form name="addPropertyForm" id="addPropertyForm" action="" cssClass="hestia_form" commandName="property" method="POST">
    
    ..... more code....
    <div id="attachments">
    				<jsp:include page="attachments.jsp"></jsp:include>
    			</div>
    If I give a <form:errors> in any of those included pages then the jsp is not rendered while <form:input> etc.tags are being correctly rendered..

    The error that I get is
    Code:
    java.lang.IllegalStateException: The 'errors' tag can only be used inside a valid 'form' tag.
    but if I include all those error tags on my original page then they work.. why is it so ? how do I get around it ?

    Thanks in advance!

  • #2
    Hi,

    Instead of using

    Code:
    <jsp:include page="attachments.jsp"></jsp:include>
    try using

    Code:
    <%@ include file="attachments.jsp" %>
    Thanks,
    Anand

    Comment


    • #3
      That worked !

      thanks

      Comment

      Working...
      X