NutzCN Logo
问答 本地没问题,tomcat部署后找不到js和css
发布于 2671天前 作者 qq_23cc167b 3627 次浏览 复制 上一个帖子 下一个帖子
标签:

目录结构 Resources与WEB-INF并列
js和css 在 webapp/Resources下
jsp 在 webapp/WEB-INF/templates/login.jsp

0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Smart/ HTTP/1.1" 200 6185
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/vendor/bootstrap/css/bootstrap.css HTTP/1.1" 404 1114
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/vendor/animate.css/animate.css HTTP/1.1" 404 1110
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/vendor/font-awesome/css/font-awesome.css HTTP/1.1" 404 1120
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/vendor/toastr/toastr.min.css HTTP/1.1" 404 1108
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/stylesheets/css/style.css HTTP/1.1" 404 1105
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/vendor/toastr/toastr.min.js HTTP/1.1" 404 1107
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/vendor/bootstrap/js/bootstrap.min.js HTTP/1.1" 404 1116
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/javascripts/template-script.min.js HTTP/1.1" 404 1114
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/javascripts/template-init.min.js HTTP/1.1" 404 1112
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/vendor/nano-scroller/nano-scroller.js HTTP/1.1" 404 1117
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/images/logo-dark.png HTTP/1.1" 404 1100
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/vendor/jquery/jquery-1.12.3.min.js HTTP/1.1" 404 1114
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/vendor/bootstrap/js/bootstrap.min.js HTTP/1.1" 404 1116
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/vendor/nano-scroller/nano-scroller.js HTTP/1.1" 404 1117
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/javascripts/template-script.min.js HTTP/1.1" 404 1114
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/javascripts/template-init.min.js HTTP/1.1" 404 1112
0:0:0:0:0:0:0:1 - - [30/Aug/2017:18:40:19 +0800] "GET /Resources/vendor/toastr/toastr.min.js HTTP/1.1" 404 1107

 <link rel="apple-touch-icon" sizes="120x120" href="../Resources/favicon/apple-icon-120x120.png" />
    <link rel="icon" type="image/png" sizes="192x192" href="../Resources/favicon/android-icon-192x192.png" />
    <link rel="icon" type="image/png" sizes="32x32" href="../Resources/favicon/favicon-32x32.png" />
    <link rel="icon" type="image/png" sizes="16x16" href="../Resources/favicon/favicon-16x16.png" />
    <link rel="stylesheet" href="../Resources/vendor/bootstrap/css/bootstrap.css" />
    <link rel="stylesheet" href="../Resources/vendor/data-table/media/css/dataTables.bootstrap.css">
    <link rel="stylesheet" href="../Resources/vendor/font-awesome/css/font-awesome.css" />
    <link rel="stylesheet" href="../Resources/vendor/animate.css/animate.css" />
    <link rel="stylesheet" href="../Resources/vendor/select2/css/select2.min.css">
    <link rel="stylesheet" href="../Resources/vendor/select2/css/select2-bootstrap.min.css">
4 回复
<link rel="stylesheet" href="${base}/Resources/vendor/select2/css/select2-bootstrap.min.css">

貌似你做的是前后端的动静分离?

加上${base} 没有用

那正确的url路径是怎样的

添加回复
请先登陆
回到顶部