唉!真的要说一句话叫做论一串代码的重要性!就是如此的气人!气的牙根痒痒!

前几天刚刚写过SpringMVC之ModelAndView的 jsp值在浏览页面不显示的问题!也是因为这一串代码,但是这一次一点提示没有,不是有提示的看:英文版的:

中文版的:

请问这和这串代码有什么关系?我一直以为是这串代码错了。

得亏我来神来之笔:

<%@ page isELIgnored="false" %>

一串代码搞定。那我们就来论一下

<%@ page isELIgnored="false" %>的重要性:

<%@ page isELIgnored="false"%>的作用

JSP 2.0的一个主要特点是它支持表达语言(expression language)。JSTL表达式语言可以使用标记格式方便地访问JSP的隐含对象和JavaBeans组件,JSTL的核心标记提供了流程和循环控制功能。自制标记也有自定义函数的功能,因此基本上所有seriptlet能实现的功能都可以由JSP替代。在JSP 2.0中,建议尽量使用EL而使JSP的格式更一致。

在web.xml的<jsp-property-group>中可以控制一组JSP是否使用EL,在每个JSP中也可以指定是否该JSP使用EL。在page directive中的isELIgnored属性用来指定是否忽略。格式为:

<%@ page isELIgnored="true|false"%>

如果设定为真,那么JSP中的表达式被当成字符串处理。比如下面这个表达式<p>${2000 % 20}</p>在isELIgnored="true"时输出为${2000 % 20},而isELIgnored="false"时输出为100。Web容器默认isELIgnored="false"。

所以在编译JSP文件时一定要加上这一串代码。(这也是网上前辈们的总结)

真是对JAVA又爱又恨!没办法!

转载于:https://www.cnblogs.com/liusong-funtime/p/9282948.html

Attribute 'items' must be an array, a Collection or a Map错误解决!相关推荐

  1. sklearn使用FeatureHasher处理字符串特征: AttributeError: ‘str‘ object has no attribute ‘items‘

    sklearn使用FeatureHasher处理字符串特征: AttributeError: 'str' object has no attribute 'items' 目录 sklearn使用Fea ...

  2. Python 保存数组至.mat文件,报错:AttributeError: 'numpy.ndarray' object has no attribute 'items'

    Python保存数组的方式有很多种,如savetxt,但这个函数只能保存一维或二维数组.为了保存高维数组,同时能够在matlab载入,可以使用scipy.io.savemat()函数,例子: impo ...

  3. 成功解决AttributeError: 'map' object has no attribute 'items'

    成功解决AttributeError: 'map' object has no attribute 'items' 目录 解决问题 解决思路 解决方法 解决问题 AttributeError: 'ma ...

  4. 已解决AttributeError set object has no attribute items(亲测)

    AttributeError: 'set' object has no attribute 'items' 出现这个问题,原因可能是定义的header有问题 正确如下: header={"k ...

  5. python中使用ZADD方法报错AttributeError: 'int' object has no attribute 'items'

    redis的版本关系 正确的完整实例如下: import pymongo import redis# 代码作用是mongodb的数据传送到redis中去 handler = pymongo.Mongo ...

  6. celery AttributeError: 'str' object has no attribute 'items'

    AttributeError: 'str' object has no attribute 'items' python manage.py celery worker --loglevel=info ...

  7. AttributeError: ‘set‘ object has no attribute ‘items‘

    AttributeError: 'set' object has no attribute 'items' 出现这个问题,原因可能是定义的header有问题 正确如下: header={"k ...

  8. 爬虫的自创建请求对象:报错AttributeError: 'str' object has no attribute 'items'

    在使用爬虫库创建自定义请求对象时 将值传入headers agent = random.choice(userAgent) REQ = request.Request(url,headers=agen ...

  9. El表达式“attribute items does not accept any expressions”

    El表达式"attribute items does not accept any expressions" 正常该导入: <%@ taglib prefix="c ...

最新文章

  1. java 6位日期 0001,当日期范围更改为从01-01-0001开始时,DimDate将不会加载
  2. Linux-Rsync命令参数详解
  3. 实现strstr(****)
  4. shell脚本开发总结
  5. 网络协议,我明明学过的呀?
  6. 【解题报告】Leecode 643. 子数组最大平均数 I——Leecode 刷题系列
  7. 台式计算机序列号在哪,台式机如何查看序列号
  8. hbase 的shell操作中相关属性说明
  9. iOS开发:创建真机调试证书
  10. 腾讯广告的多媒体AI技术实战
  11. linux文件共享加锁,Linux共享数据管理——文件锁定
  12. abaqus算出来的转角单位是什么_abaqus单位等等
  13. Qt QDir相关笔记
  14. array函数python_python中如何使用numpy.array函数创建数组?
  15. pr如何跳到关键帧_【技能培训营】Pr基本操作(五)
  16. 亚马逊SP-API接口申请对外公开可发布教程
  17. Sun jdk、Openjdk、Icedtea jdk关系
  18. 【linux C】基础
  19. 免费申请 HTTPS 证书,开启全站 HTTPS
  20. 搭建Spark开发环境(第二弹)

热门文章

  1. python 图像处理
  2. 怎么去除mp4视频的水印?教你去视频水印的方法
  3. 一个简单的美女拼图游戏
  4. SUSE Linux11 SP3 安装
  5. 一种企业办公系统中表单数据的分级别加密传输方法-交底书
  6. Apollo Planning决策规划算法代码详细解析 (15): 速度动态规划SPEED_HEURISTIC_OPTIMIZER 上
  7. flex Form Validator 检验提交
  8. linux网络编程中listen函数 backlog的含义
  9. 四六级复习词汇-第一天
  10. C#播放背景音乐的五种方法