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/**" />
时间: 2025-01-06 22:56:30