I wanted to store a character value in a variable using the JSTL
My code to do this is:
<c:set var="letter" value='${param.colorLetter.toLowerCase().charAt(0)}' ></c:set>
Next i need to try and check if the character was ‘v’:
<c:choose>
<c:when test="${letter}=='v'">
<lable>Color Name: </lable>Violet<br/>
</c:when>
</c:choose>
Currently I feel that it is not storing it as a Character Variable and so the test is failing. (No errors/exceptions)
You have to put the whole test between
${}and to addtoString()after yourcharAt(0)to cast fromCharactertoString.