目录

错误

错误代码

错误原因

解决

正确代码一

正确代码二

正确代码三


错误

错误代码

<c:forEach var="trueName" items="<%=(List<String>)session.getAttribute("teacherTrueNameList")%>"><option value="${trueName}">${trueName}</option>
</c:forEach>

错误原因

由于tomcat版本的原因,对双引号的处理产生的问题。

这里会报这种错误的原因就是双引号里面嵌套了双引号。

解决

就是处理双引号的问题啊。

正确代码一

将最外面的双引号改为单引号。

<c:forEach var="trueName" items='<%=(List<String>)session.getAttribute("teacherTrueNameList")%>'><option value="${trueName}">${trueName}</option>
</c:forEach>

正确代码二

将双引号的表达式另写,然后用一个变量替代。

<%List<String> list=(List<String>)session.getAttribute("teacherTrueNameList");
%>
<c:forEach var="trueName" items="<%=list%>"><option value="${trueName}">${trueName}</option>
</c:forEach>

正确代码三

使用"\"转义,编辑器会报错但是不影响运行结果,如:

<c:forEach var="trueName" items="<%=(List<String>)session.getAttribute(\"teacherTrueNameList\")%>"><option value="${trueName}">${trueName}</option>
</c:forEach>

tomcat错误“Attribute value is quoted with which must be escaped when used within the value”相关推荐

  1. Attribute value is quoted with which must be escaped when used within the value 问题解决

    访问JSP时,报错:Attribute value is quoted with " which must be escaped when used within the value .相信 ...

  2. Attribute value is quoted with “ which must be escaped when used within the value 问题解决

    Attribute value is quoted with " which must be escaped when used within the value 问题解决 参考文章: (1 ...

  3. ttribute value is quoted with which must be escaped when used within the value

    今天做项目访问JSP时,报错:Attribute value is quoted with " which must be escaped when used within the valu ...

  4. JSP: quoted with which must be escaped when used within the value 报错问题解决

    访问JSP时,报错:Attribute value is quoted with " which must be escaped when used within the value .相信 ...

  5. 错误:is quoted with which must be escaped when used within the value

    严重: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: /index.jsp( ...

  6. Tomcat 错误锦集

    Tomcat 错误锦集 第一种错误 未完待续 第一种错误 org.apache.cxf.transport.servlet.ServletController invoke 警告: Can't fin ...

  7. linux apache tomcat ajp,apache ajp 整合 tomcat 错误

    apache ajp 整合 tomcat 错误 发布时间:2009-03-31 19:15:59来源:红联作者:njliuqi [Tue Mar 31 17:06:20 2009] [error] a ...

  8. 跑faster rcnn测试时遇到错误Attribute Error: 'NoneType' object has no attribute 'astype'

    如题,用自己的数据集跑faster rcnn的测试demo的时候遇到这样的错误:Attribute Error: 'NoneType' object has no attribute 'astype' ...

  9. tomcat错误: javax.management.MalformedObjectNameException: Invalid character ':' in value part of prop

    前言 tomcat : 8.5.24 redhat 7 错误日志 07-Aug-2019 14:45:52.901 INFO [localhost-startStop-1] org.apache.ca ...

最新文章

  1. 闸流管(或双向可控硅) IGBT 应用
  2. 23设计模式简介笔记
  3. 汇编实验 用表格形式显示字符(附源码详细注释和相关注意的知识)
  4. mysql的一个bug Block Nested Loop
  5. YII用户注冊和用户登录(五)之进行session和cookie分析 ,并在前后区分session和cookie...
  6. MySQL中int、char、varchar的性能浅谈
  7. JDK 6中新增的Java Console类功能概览
  8. 矩形脉冲信号的_IQ信号的解调学习
  9. Elasticsearch7.15.2 基础概念和基础语法
  10. 搭建webUI自动化及问题解决:Message: ‘chromedriver‘ executable needs to be in PATH.解决办法
  11. jQuery的hide() 、show() 、toggle()
  12. 02-dos2unix命令与windows编辑shell不可执行问题
  13. idea的tomcat改端口号_tomcat8修改端口,tomcat更改端口
  14. 带瀑布流的电钢琴_你没有看错 这个Find智能钢琴它会自己弹琴
  15. python与审计底稿关系_干货!审计底稿,六大禁忌
  16. 记一次勒索病毒下的Oracle数据恢复
  17. word转chm文件
  18. 任务栏-IDEA图标变白色
  19. 关于高德地图崩溃的问题
  20. TCP/IP Socket 服务器对接

热门文章

  1. TI 毫米波雷达学习网站链接整理
  2. java分子分母的加减乘除_JAVA实现精确的加减乘除代码
  3. Jenkins编辑或替换All view
  4. 阿里云CentOS7下mysql5.6安装问题总结
  5. Mycat 读写分离、主从切换、分库分表的操作记录
  6. 美团人的写作基本功是如何练成的
  7. GAL 高压缩版辅助工具
  8. 电脑与云服务器的区别吗,云服务器和普通电脑有什么不同区别?
  9. python爬虫微博图片_python爬取微博图片及内容
  10. CPU使用率原理及计算方式