【发布时间】:2017-06-18 06:21:51
【问题描述】:
我正在使用 JSP 进行 Spring Boot,当我在我的 jsp 中尝试以下代码时,我遇到了异常:
<div class="fc-table ctc-fix-111 border-t inner-grid">
#{if _purchases.isEmpty()}
<div class="fc-row">
所以我得到以下代码“#{if _purchases.isEmpty()}”的异常
Servlet.service() for servlet [dispatcherServlet] 在路径 [] 的上下文中抛出异常 [/WEB-INF/jsp/subscriptionsTables.jsp (line: 12, column: 10) #{...} is not allowed在模板文本中] 有根本原因
org.apache.jasper.JasperException: /WEB-INF/jsp/subscriptionsTables.jsp (line: 12, column: 10) #{...} is not allowed in template text 在 org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41) ~[tomcat-embed-jasper-8.5.6.jar:8.5.6]
那么有什么方法可以在我的jsp中使用这样的代码,我需要为此添加任何依赖项吗?
【问题讨论】:
标签: jsp groovy spring-boot