日期:2014-05-16  浏览次数:20385 次

错误 javax.servlet.jsp.el.ELException: Encountered "\", expected one of ["}", ".",

?

WAS中运行JSP時报如下错误:

Servlet Error]-[action]: javax.servlet.jsp.el.ELException: Encountered "\", expected one of ["}", ".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||", "?"] at org.apache.commons.el.ExpressionEvaluatorImpl.parseExpressionString(ExpressionEvaluatorImpl.java:324) at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:250) at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:754) at com.ibm._jsp._SearchAdvanced._jspx_meth_c_forEach_0(_SearchAdvanced.java:204)

错误代码:el表达式出现了换行或空格是不可以的

?

?

?

<c:forEach var="step" begin="1" end="${pageTotal}">
	<option value="${step }"
	      ${step
					}
        </option>
</c:forEach>

?

?更正后的代码:

?

?

<c:forEach var="step" begin="1" end="${pageTotal}">
	<option value="${step}"
	      ${step}
        </option>
</c:forEach>

?