码迷,mamicode.com
首页 > 编程语言 > 详细

easyUI+springMVC的DataGrid-demo

时间:2016-08-02 01:23:07      阅读:722      评论:0      收藏:0      [点我收藏+]

标签:

DataGrid

(一)、搭建springMVC;

  错误:无法访问HTML页面,HTTP Status 404-

  原因:springMVC拦截了静态资源的访问

解决方案:方案①:(web.xml下)<servlet-mapping><servlet-name>jsp</servlet-name><url-pattern>*.html</url-pattern></servlet-mapping> 
     方案②:(springMVC.xml 下)<mvc:resources location="/" mapping="/**" />

(二)、加入easyUI:

1、文件头:方式一:

<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css"  href="../jquery-easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../jquery-easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="../jquery-easyui/demo.css">
<script type="text/javascript" src="../jquery-easyui/jquery.min.js"></script>
<script type="text/javascript"  src="../jquery-easyui/jquery.easyui.min.js"></script>
<script type="text/javascript"  src="../jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
</head>

错误:确定路径没错,但界面一直显示不出来。
原因:springMVC拦截了静态资源的访问

解决方案:

<!-- 静态资源访问 -->
     <mvc:resources location="/jquery-easyui/themes/" mapping="/jquery-easyui/themes/**"/>  
     <mvc:resources location="/jquery-easyui/" mapping="/jquery-easyui/**"/> 
     <mvc:resources location="/jquery-easyui/locale/" mapping="/locale/**" />  

 

easyUI+springMVC的DataGrid-demo

标签:

原文地址:http://www.cnblogs.com/liaozs/p/5727734.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!