bug收集01
2017-12-29 14:42
113 查看
SpringMVC中JSP取不到ModelAndView的数据原因(转)
不管是用 ${msg} 还是用JSTL的<c:out value="${msg}"/> 都不行
通过这篇文章 http://forum.springsource.org/showthread.php?117394-Unable-to-access-modelAndView-attributes-in-JSP-without-JSTL
才发现犯了一个平时不会注意的错误
我是用maven自动生成的web.xml文件 如下:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
</web-app>
但这样的文件不行,需要改成
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
</web-app>
重启就OK了,现在上面的两种方法都支持了
转载:http://www.cnblogs.com/cszzy/archive/2012/12/05/2803652.html
相关文章推荐
- HDU 2602 Bone Collector 收集骨头+最基本的01背包
- C语言中易犯的BUG收集
- DVD-R-01.我自己搜索收集的一些Delphi免杀远控软件源代码(永久免云杀变种)2013-12-14 11:53:19
- android项目bug收集
- J2ME 机型开发bug收集
- 收集一些未知Bug。
- [项目bug收集整理1]Integer 对象的相等比较
- jquery博客收集的IE6中CSS常见BUG全集及解决方案
- iO 4000 S-Bug收集:You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated
- iOS_Bug收集(一)
- 电脑主板资料库 01【转至www.ongood.com.tw】【FreeXploiT收集整理】
- node-webkit系列(01):我是如何Fix开源项目的Bug的
- Android-Bug收集
- java 开发问题和bug收集
- [项目bug收集整理2] Map的key,如果是非内置对象,需要自己实现hashCode和equals方法
- ASP常用函数大收集01[大部分来自网络]
- 垃圾收集导致的概率性发生的bug
- 兼容性bug及解决策略[不断收集]
- 收集一些关于IE的BUG
- crawler_爬虫分布式设计图收集_01