I am trying a simple validation program with JSP and EL (not that I need the functionality itself, but just to learn the ropes of JSP). I set the prefix as “mine” and validate is a function which checks if the two String inputs are equal to "admin" and "password" using the String.equals method. However, I get "false" (unexpected) from the first code block and "true" (as expected) from the second.
What’s going on?
The following code is in my jsp file.
<c:set var="a" value="admin"/>
<c:set var="b" value="password"/>
${mine:validate(a, b)}
OR
${mine:validate("admin", "password")}
Here is the full code:
<%@ taglib prefix="mine" uri="Functions"%>
<html>
<body>
<c:set var="a" value="admin"/>
<c:set var="b" value="password"/>
${mine:validate(a, b)}
</body>
</html>
I cannot select a best answer so I will have to quote the comment left by Affe: