jsp - Calling EL function with EL variable like ${fn:toLowerCase(${Person.name})} doesn't work -
i passing bean: person
jsp page, , print name in lower case. this, i'm calling jstl's function tolowercase
, doesn't work:
<c:out value="${fn:tolowercase(${person.name})}"
instead, have set variable
<c:set var="personname" value="${person.name}"/> <c:out value="${fn:tolowercase(personname)}"
is there more syntactically friendly way of doing this?
nesting el expressions illegal syntax. should have been hinted in way exception faced didn't tell about. should see el expression ${... ...}
1 big global scope wherein various el scoped variables , functions can interact each other. second attempt doing correctly. apply same on initial attempt:
<c:out value="${fn:tolowercase(person.name)}"/>
by way, i'd rather respect java naming conventoins , lowercase instance variable name person
person
. don't person person = new person();
in normal java code, right?
Comments
Post a Comment