带有 fn 函数的 JSTL
JSTL with fn functions
我有一个基于 Spring Web 模型-视图-控制器 (MVC) 框架的项目。 Spring Web 模型-视图-控制器 (MVC) 框架的版本是 3.2.8。
在我的 JSP
${fn:toUpperCase(<fmt:message key="${description.language.label}" />)}
但是我遇到了这个错误
weblogic.servlet.jsp.CompilationException: deviceInfo.jsp:118:61: Syntax error in expression. Encountered "<". Expected one of : <INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", ")", "!", "not", "empty", "-", <IDENTIFIER>,
${fn:toUpperCase(<fmt:message key="${description.language.label}" />)}
^
${ }
表达式中的 <fmt:message>
标签不起作用。您可以设置一个临时变量来包含消息输出并在表达式中使用它:
<c:set var="msg">
<fmt:message key="${description.language.label}" />
</c:set>
...
${fn:toUpperCase(msg)}
我有一个基于 Spring Web 模型-视图-控制器 (MVC) 框架的项目。 Spring Web 模型-视图-控制器 (MVC) 框架的版本是 3.2.8。
在我的 JSP
${fn:toUpperCase(<fmt:message key="${description.language.label}" />)}
但是我遇到了这个错误
weblogic.servlet.jsp.CompilationException: deviceInfo.jsp:118:61: Syntax error in expression. Encountered "<". Expected one of : <INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", ")", "!", "not", "empty", "-", <IDENTIFIER>,
${fn:toUpperCase(<fmt:message key="${description.language.label}" />)}
^
${ }
表达式中的 <fmt:message>
标签不起作用。您可以设置一个临时变量来包含消息输出并在表达式中使用它:
<c:set var="msg">
<fmt:message key="${description.language.label}" />
</c:set>
...
${fn:toUpperCase(msg)}