2 Replies Latest reply: Sep 26, 2011 11:02 AM by rukbat RSS

    problem with customtag

    Prem
      Hi sorry to post this problem here...

      I have created a custom tag say <test:customTag>

      when this tag encounters everything is executed fine but end tag </test:customTag> is encounterd when certain condition is true like this

      <%if(condition==true){%>

      </test:customTag>

      <%i}%>

      endTag needs to be executed on certain condition and only at that time doEndTag() needs to be executed as well. But it is giving me compile error ..

      Please suggest what needs to do..
        • 1. Re: problem with customtag
          maheshguruswamy
          Prem wrote:
          Hi sorry to post this problem here...

          I have created a custom tag say <test:customTag>

          when this tag encounters everything is executed fine but end tag </test:customTag> is encounterd when certain condition is true like this

          <%if(condition==true){%>

          </test:customTag>

          <%i}%>

          endTag needs to be executed on certain condition and only at that time doEndTag() needs to be executed as well. But it is giving me compile error ..

          Please suggest what needs to do..
          That doesn't make any sense. Why would you want to execute half a tag? Whatever conditions you need to handle, either handle it outside the tag or handle it in the implementation of the tag.
          • 2. Re: problem with customtag
            rukbat
            Moderator Action:
            ... moved from the Reflections forum to the JSP forum, hopefully for closer topic alignment.