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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -