Tomcat404错误:All URLs used to access the Manager application should now start with one of the followi

环境:

IDE:idea 2017.02css

server:Tomcat 9.0.6html

框架:ssm + redisweb


错误现象:

ssm框架下,request的映射路径没有问题,控制台也没有抛出异常,主页能正常打开,可是不能跳转到Controller的路径,redis

报了如下错误:tomcat

The page you tried to access (/manager/text/sessions) 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 pages
Note 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.

Tomcat找不到页面,Manager Application在Tomcat7中作了更新,全部访问Manager Application的URL必须如下列之一开头,访问的URL不正确,致使找不到页面。markdown


缘由猜想:

网上查了一下,只找到一个帖子:https://stackoverflow.com/questions/36462764/accessing-tomcat-manager-throws-404session

他给了解决方法,在Tomcat路径下找到配置文件,context.xml,增长一句:app

<!-- The contents of this file will be loaded for each web application -->
<Context privileged="true">

    <!-- Default set of monitored resources. If one of these changes, the    -->
    <!-- web application will be reloaded.

加上一句<Context privileged="true">,说是Tomcat权限问题,没仔细研究过,直接改了配置文件,可是没有用。框架


个人解决方法和一点猜测:

看日志的信息表达的意思多是由于/manager....是访问Tomcat内部的配置的路径?我看到以前那我的的访问路径也有/manager..,好比http://localhost:8080/manager/html....是访问Tomcat的某个管理项的,其余相似,至关于manager在路径里是不能用的。ide

因而我改了Controller类里映射路径,把@RequestMapping("/manager")里的"/manager"换成其余字符串,

而后从新启动Tomcat就能正常访问了。

相关文章
相关标签/搜索