Categories
Java

String comparison in JSTL

To compare the value of two strings in Java one would simply do:

string1.equals(string2)

Yet JSTL EL does not use the . notation the same way. Instead, JSTL actually works the right way:

<c:if test="string1 == string2" />

Different…

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Share