运行时错误:
index.jsp(12,8) PWC6038: "${sqlStatement == null}" contains invalid expression(s):
javax.el.ELException: Unable to find ExpressionFactory of type:
org.apache.el.ExpressionFactoryImpl
org.apache.jasper.JasperException: : javax.el.ELException: Unable to find ExpressionFactory of type: org.apache.el.ExpressionFactoryImpl
问题:
- 我将如何调试这个?
- 找不到类型的 ExpressionFactory:org.apache.el.ExpressionFactoryImpl <-- 这是什么意思?
这就是我所拥有的
- NetBeans IDE 7.3
- 雄猫 7.0
- MySql 连接
这是 Murach 书中的一个简单的 sql 网关
索引.jsp
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:if test="${sqlStatement == null}">
<c:set var="sqlStatment" value="select * from User" />
</c:if>
<h1>The SQL Gateway</h1>
<p>Enter an SQL statement and click the execute button. Then, information about the<br/>
statement will appear at the bottom of this page.
</p>
<p><b>SQL Statement:</b></p>
<form action="SqlGateway" method="POST">
<textarea name="sqlStatement" cols="60" rows="8">${sqlStatement}</textarea>
<br/><br/>
<input type="submit" value="Execute">
</form>
<p><b>SQL result:</b></p>
<p>${sqlResult}</p>
web.xml
<servlet>
<servlet-name>SqlGatewayServlet</servlet-name>
<servlet-class>sql.SqlGatewayServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SqlGatewayServlet</servlet-name>
<url-pattern>/SqlGateway</url-pattern>
</servlet-mapping>
我认为 servlet 没有任何问题,但如果您需要我发布它,请告诉我。