if in JSTL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    if in JSTL

    look at my code ......

    [code=jsp]
    <jsp:usebean id = "test" scope = "page" class="java.lan g.String"/>
    <c:if test = "test.length()= =0">
    <H1>Welcome JSTL</h1>
    <!--This portion is not executed-->
    </c:if>
    [/code]

    here c is the prefix.
    So JSTL experts ... Plz explain why the <H1>Welcome JSTL</H1> is not executed?

    Kind regards,
    Dmjpro.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by dmjpro
    look at my code ......

    [code=jsp]
    <jsp:usebean id = "test" scope = "page" class="java.lan g.String"/>
    <c:if test = "test.length()= =0">
    <H1>Welcome JSTL</h1>
    <!--This portion is not executed-->
    </c:if>
    [/code]

    here c is the prefix.
    So JSTL experts ... Plz explain why the <H1>Welcome JSTL</H1> is not executed?

    Kind regards,
    Dmjpro.
    Dj, you need to improve on selecting thread titles. The title must relate as much as possible to the problem.
    I've renamed this one.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by dmjpro
      look at my code ......

      [code=jsp]
      <jsp:usebean id = "test" scope = "page" class="java.lan g.String"/>
      <c:if test = "test.length()= =0">
      <H1>Welcome JSTL</h1>
      <!--This portion is not executed-->
      </c:if>
      [/code]

      here c is the prefix.
      So JSTL experts ... Plz explain why the <H1>Welcome JSTL</H1> is not executed?

      Kind regards,
      Dmjpro.
      Well 'test' is a String, you've declared it so in your first line. The length of test
      isn't equal to zero apparently. You know about your own 'test' variable, not me.

      kind regards,

      Jos

      Comment

      Working...