WebSphere Publishing app, El Expression ${fn.replace} for JSP error:
[10/24/17 19:02:45:181 CST] 00000038 servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service Srve0068e:an Exception was thrown by one of the service methods of the Servlets [/web-inf/jsp/modules/xx/xx.jsp] in application [Xx_war] . Exception created: [javax.el.ELException:Function ' fn:replace ' not found
At Org.apache.el.lang.ExpressionBuilder.visit (expressionbuilder.java:197)
At
cause of error : WebSphere does not correctly handle the function of a single quote -wrapped El expression.
workaround : Enclose the El expression in double quotation marks instead of single quotes.
Examples are as follows:
Problematic JSP code
< Div ></div >
Modified to:
<= "${fn:replace (pdata.attributes.type, ' | ', ' _ ')}_invest${ind.index}" ></ Div >
Reference:
https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014934503
The JSP in WebSphere uses EL expression ${fn.replace} error-' Fn:replace ' not found