我最近升级到了Spring 4.3.8.RELEASE
。什么是在JSP页面上逃避JS的正确方法?我在我的页面上有这个
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
...
var _currentId = "<spring:escapeBody javaScriptEscape="true">${myId}</spring:escapeBody>";
但导致此错误......
21:08:11,024 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/myproject].[myprojectDispatcher]] (ajp-/127.0.0.1:8009-12) Servlet.service() for servlet myprojectDispatcher threw exception: java.lang.NoSuchMethodError: org.springframework.web.servlet.tags.EscapeBodyTag.setJavaScriptEscape(Ljava/lang/String;)V