The page you tried to access (/manager/login.do) does not exist

来源:互联网 发布:985 知乎 编辑:程序博客网 时间:2024/04/29 06:31
前些天我把以前完成的项目的后台管理系统用来作新项目的后台管理平台,以前的项目用的是MyEclipse(简单,而且顺手)作为开发工具,现在将项目移到Idea平台上面来。所有的东西配置好,tomcat8一启动么有什么错误,当我登录的时候就出现
The page you tried to access (/manager/login.do) does not exist.The Manager application has been re-structured for Tomcat 7 onwards and some of URLs have changed. All URLs used to access the Manager application should now start with one of the following options:/manager/html for the HTML GUI/manager/text for the text interface/manager/jmxproxy for the JMX proxy/manager/status for the status pagesNote that the URL for the text interface has changed from "/manager" to "/manager/text".You probably need to adjust the URL you are using to access the Manager application. However, there is always a chance you have found a bug in the Manager application. If you are sure you have found a bug, and that the bug has not already been reported, please report it to the Apache Tomcat team.

啊!当时我蒙了,因为测试了其他请求,完全能用,就只有这个请求不能用,我仔细检查struts2配置文件,但都没有问题,我一直在想这个错误怎么没有见到过,而且我的项目关tomcat本生没有事吧。后来我试了一下请求localhost:8080/manager,因为struts2上面配置了默认请求。结果我就开心了,出现下面界面这里写图片描述
我开心知道这不是我项目有问题,很简单的,是因为我的这个请求端口是8080,tomat管理页面的端口也是8080,这下明白了吧,我们的请求被tomcat本身给拦截了。以前我的项目端口是8081,而且后面还跟上项目名称所以完全不会有这种情况。处理这种情况只有

  1. 改端口号
  2. Idea默认访问时“/”我们将它改成”/项目名”这里写图片描述
  3. 修改我们请求,像struts2 修改action的namespace,比如将<package name="测试index" namespace="/Manager" extends="struts-default">改为<package name="测试index" namespace="/Manager" extends="struts-default">
    看完觉得还行有帮助记得给赞。
    tomat说明链接
阅读全文
0 0
原创粉丝点击