My-Blog icon indicating copy to clipboard operation
My-Blog copied to clipboard

部署到tomcat,进入项目首页是xxx.xxx.xxx/blog。点击跳转到某一页面是(如友链)xxx.xxx.xxx/links

Open ghost opened this issue 7 years ago • 5 comments
trafficstars

部署到tomcat,进入项目首页是xxx.xxx.xxx/blog。点击跳转到某一页面是(如友链)xxx.xxx.xxx/links,这时候只有通过xxx.xxx.xxx/blog/links 才能正确访问到友链页面,不然tomcat会404.

ghost avatar Jun 15 '18 09:06 ghost

你这是多了一级目录啊,可以改下代码路径,或者把项目部署到webapps/ROOT下,而不是webapps/ROOT/blog下,可能是你的设置问题,自己改一下就好,不影响使用吧。

ZHENFENG13 avatar Jun 15 '18 10:06 ZHENFENG13

问题解决了,非常感谢。

ghost avatar Jul 02 '18 11:07 ghost

请问你怎么解决的

wulixzCN avatar Oct 27 '18 16:10 wulixzCN

问题解决了,非常感谢。

请问怎么解决的

wulixzCN avatar Oct 27 '18 16:10 wulixzCN

我是修改web.xml文件 如下所示, <Context path="" docBase="//usr/share/tomcat/tomcat/apache-tomcat-7.0.82/webapps/apps" > app是我这个项目的名字。

ghost avatar Oct 30 '18 02:10 ghost