且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JSTL foreach循环中的项目值在Portlet中不起作用

更新时间:2022-02-27 22:00:29

<c:out value="${aName}"/>有效!但是${aName}也不能正常工作吗?

<c:out value="${aName}"/> works!! But shouldn't ${aName} work aswell?

因此,模板文本中的EL"无效吗?可能有以下一种或多种原因:

Thus, "EL in template text" doesn't work? That can have one or more of the following causes:

  1. 有问题的应用程序服务器不支持JSP 2.0.
  2. web.xml未声明为Servlet 2.4或更高版本.
  3. @page配置有isELIgnored=true.
  4. web.xml<jsp-config>中用<el-ignored>true</el-ignored>配置.
  1. Application server in question doesn't support JSP 2.0.
  2. The web.xml is not declared as Servlet 2.4 or higher.
  3. The @page is configured with isELIgnored=true.
  4. The web.xml is configured with <el-ignored>true</el-ignored> in <jsp-config>.

要修复一个或另一个,显然可以:

To fix one or other, obviously do:

  1. 升级服务器或改为使用JSTL c:out并与之一起使用.
  2. ***将web.xml声明为appserver支持的最新Servlet API版本.
  3. 删除isELIgnored=true属性.
  4. 删除<el-ignored>true</el-ignored>条目.
  1. Upgrade server or use JSTL c:out instead and live with it.
  2. Preferably declare web.xml to latest Servlet API version supported by appserver.
  3. Remove the isELIgnored=true attribute.
  4. Remove the <el-ignored>true</el-ignored> entry.