mercredi 23 septembre 2015

C:when dosn't work with list values in jsp

Below is the code, In quentionAnsers[0] in have single as string value, When i display ${quentionAnsers[0]} it prints Single in the same page but it is not working with c:when, In my Jsp page i am getting both check box and radio button where i am expecting only checkbox's, Please help me!

 <c:choose>
    <c:when test="${quentionAnsers[0] == 'single'}">
        <input type="checkbox" name="language" value="English" />English
        <input type="checkbox" name="language" value="French" />French
    </c:when>
    <c:otherwise>
        <input type="radio" name="gender" value="Male" />Male
        <input type="radio" name="gender" value="Female" />Female</td>
    </c:otherwise>
</c:choose>

Aucun commentaire:

Enregistrer un commentaire