title: Unterminated &lt;html:form tag JSP
body: <p>I have a small problem . When i use form without if condition like </p>
  
  <pre><code>    &lt;html:form  action="/customerDepositReport.doo?showCustDepsForPrintingReceipt_action=showCustDepsForPrintingReceipt"&gt;   
  </code></pre>
  
  <p>it works fine but when i enclosed it in my if else like </p>
  
  <pre><code>&lt;% if(session.getAttribute("correctionEntry")!=null) { %&gt;            
    &lt;html:form  action="/preEntryCorrection.doo?entryCorrection_action=entryCorrection"&gt;              
    &lt;input type="hidden" name="showDepositsList" value=""&gt;
    &lt;% }else{ %&gt;
      &lt;html:form  action="/customerDepositReport.doo?showCustDepsForPrintingReceipt_action=showCustDepsForPrintingReceipt"&gt;   
  &lt;% } %&gt;
  </code></pre>
  
  <p>It gives me an exception :</p>
  
  <blockquote>
    <p>org.apache.jasper.JasperException: /jsp/custmngmt/reports/viewCustomerDepositReportCriteriaForOldReceipt.jsp(356,0) Unterminated &lt;html:form tag
        org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
        org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
        org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:132)
        org.apache.jasper.compiler.Parser.parseBody(Parser.java:1646)
        org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:976)
        org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1247)
        org.apache.jasper.compiler.Parser.parseElements(Parser.java:1421)
        org.apache.jasper.compiler.Parser.parse(Parser.java:130)
        org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
        org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
        org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:194)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:360)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
        org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1833)
        org.apache.struts.action.ActionServlet.process(ActionServlet.java:1670)
        org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:514)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:847)</p>
  </blockquote>
  
  <p>I have tested the condition , it does enter the if part but causes exception when going through the form tag . I don't get it. Some help please.</p>