1 Reply Latest reply on Jul 13, 2010 5:37 AM by Akaine Harga

    if condition always fails

    Satya K Newbie



      Can you tell me why the c:if always fails and enters c:otherwise clause ?


      Is there anything wrong in finding out the length of the string?



        • 1. Re: if condition always fails
          Akaine Harga Novice

          Khm... in JSTL if checks for a condition and executes/renders the contents if its true, there is no otherwise statement for it.

          The if-else like structure in JSTL is achieved by using choose statement:


               <c:when test="${user.role == 'member'}">
                    <p>Welcome, member!</p>
                    <p>Welcome, guest!</p>