java - how to use nested EL in this case? -
i have empid 600 , custid 400 under session object. want apply jstl function on it. want apply project specific taglib function on "600-400"
i tried below
"${myproject:taglib(${sessionscope.empid}-${sessionscope.custid})}"
but getting below error
javax.el.elexception: failed parse expression [${myproject:taglibfunction(${sessionscope.empid]
i know can in 2 separate lines i.e
<c:set var="intermediatevar" value="${sessionscope.empid}-${sessionscope.custid}" scope="page" /> var finalvalue= "${myproject:taglibfunction(intermediatevar)}";
but there way can in single line ?
when within expression should not have ${} again. try:
edit: types variables empid , custid? type argument taglibfunction? question looks method looking string concatenation of empid (dash) custid. without more details end function/variables guessing here
instead of:
"${myproject:taglibfunction(sessionscope.empid + '-' + sessionscope.custid)}"
try:
"${myproject:taglibfunction(sessionscope.empid-sessionscope.custid)}"
either way, problem stems nested expressions. ${${}}
Comments
Post a Comment