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就能正常訪問了。