首页新闻找找看学习计划

maven java项目提交到linux,然后编译发布到tomcat上,页面不显示问题timcat

0
[已解决问题] 解决于 2018-03-05 15:36

maven编译之后,将war包放到tomcat的webapps下,自动解压,然后重启tomcat,打开什么都没有,然后在logs查看日志,还希望有人帮忙解答下问题。

项目名sunblog,在本地是完全可以运行的,而且第一次发布一个单页面的项目时也成功运行了。这次用java写了很多东西,就跑不起来了。

tomcat的日志:

36.149.221.88 - - [04/Mar/2018:16:43:34 +0800] "GET /sunblog-1.0-SNAPSHOT/myCss/menuNormalize.css HTTP/1.1" 200 1825
36.149.221.88 - - [04/Mar/2018:16:43:34 +0800] "GET /sunblog-1.0-SNAPSHOT/myCss/menuStyles.css HTTP/1.1" 200 4399
36.149.221.88 - - [04/Mar/2018:16:43:34 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:34 +0800] "GET /img/logoSW.ico HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:46 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 200 1853
36.149.221.88 - - [04/Mar/2018:16:43:46 +0800] "GET /sunblog-1.0-SNAPSHOT/myCss/menuStyles.css HTTP/1.1" 200 4399
36.149.221.88 - - [04/Mar/2018:16:43:46 +0800] "GET /sunblog-1.0-SNAPSHOT/myCss/menuNormalize.css HTTP/1.1" 200 1825
36.149.221.88 - - [04/Mar/2018:16:43:46 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:51 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:43:51 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:51 +0800] "GET /img/logoSW.ico HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:52 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:43:52 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:53 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:43:53 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:53 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:43:53 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:54 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:43:54 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:54 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:43:54 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:55 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:43:55 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:55 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:43:55 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:56 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:43:56 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:43:59 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:43:59 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:44:00 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:44:00 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:48:11 +0800] "GET / HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:48:11 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:48:11 +0800] "GET /sunblog-1.0-SNAPSHOT/ HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:48:11 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:48:11 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:50:10 +0800] "GET /sunblog-1.0-SNAPSHOT/menu.html HTTP/1.1" 200 1853
36.149.221.88 - - [04/Mar/2018:16:50:11 +0800] "GET /sunblog-1.0-SNAPSHOT/myCss/menuNormalize.css HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:50:11 +0800] "GET /sunblog-1.0-SNAPSHOT/myCss/menuStyles.css HTTP/1.1" 304 -
36.149.221.88 - - [04/Mar/2018:16:50:11 +0800] "GET /img/boy.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:50:21 +0800] "GET /sunblog-1.0-SNAPSHOT/admin/login.jsp HTTP/1.1" 200 1497
36.149.221.88 - - [04/Mar/2018:16:50:22 +0800] "GET /sunblog-1.0-SNAPSHOT/myJs/loginCheck.js HTTP/1.1" 200 1363
36.149.221.88 - - [04/Mar/2018:16:50:22 +0800] "GET /sunblog-1.0-SNAPSHOT/myCss/loginStyle.css HTTP/1.1" 200 5580
36.149.221.88 - - [04/Mar/2018:16:50:22 +0800] "GET /img/loginBackground/tree.jpg HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:50:32 +0800] "POST /api/loginCheckT HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:50:34 +0800] "POST /api/loginCheckT HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:50:35 +0800] "POST /api/loginCheckT HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:50:36 +0800] "POST /api/loginCheckT HTTP/1.1" 404 -
36.149.221.88 - - [04/Mar/2018:16:50:37 +0800] "POST /api/loginCheckT HTTP/1.1" 404 -

sunwengang的主页 sunwengang | 初学一级 | 园豆:132
提问于:2018-03-04 17:07
< >
分享
最佳答案
0

1、tomcat发布路径未去除项目路径

2、server.xml配置文件未修改完善

sunwengang | 初学一级 |园豆:132 | 2018-03-05 15:35
其他回答(1)
0

项目根是sunblog-1.0-SNAPSHOT,引用的其他文件没有这个根,所以很多的404

2012 | 园豆:18892 (专家六级) | 2018-03-05 08:05
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册