JSP:不评估EL表达式 [英] JSP: EL expression is not evaluated

查看:92
本文介绍了JSP:不评估EL表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Tomcat 5.5上运行了一个JSP页面。我有以下代码:

I have a JSP page running on Tomcat 5.5. I have the following code:

 <c:forEach var="i" begin="1" end="10" step="1">
  <c:out value="${i}" />
  <br />
</c:forEach>

我得到的输出是:

${i} 
${i} 
${i} 
${i} 
${i} 
${i} 
${i} 
${i} 
${i} 
${i} 

我无法解决为什么forEach循环正在工作但输出无效。任何人都可以提供的任何帮助都会很棒。

I cant work out why the forEach loop is working but the output is not working. Any help any one could give would be great.

推荐答案

我知道默认情况下应该启用它,但我会跨页面运行一次又一次(甚至改变行为的同一页面)EL处理没有发生。将以下内容添加到任何此类页面的顶部应解决此问题:

I know it's supposed to be on by default, but I run across pages now and again (or even the same page that changes behavior) where the EL processing doesn't happen. Adding the following to the top of any such pages should resolve the issue:

<%@ page isELIgnored="false" %> 

我将它添加到每个页面因为它没有受伤,我仍然不知道偶然导致页面停止解释EL表达式的根本原因。

I add it to every page because it doesn't hurt, and I still don't know the root cause that occasionally causes a page to stop interpreting the EL expressions.

这篇关于JSP:不评估EL表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆