Tomcat manager/html is not available?

后端 未结 10 925
暗喜
暗喜 2020-12-25 12:01

Hi I just installed Tomcat and and am trying to get it up and running however whenever I try to navigate to manager/html it gives me this error \"The requested resource (/ma

10条回答
  •  鱼传尺愫
    2020-12-25 12:57

    I had the situatuion when tomcat manager did not start. I had this exception in my logs/manager.DDD-MM-YY.log:

    org.apache.catalina.core.StandardContext filterStart
    SEVERE: Exception starting filter CSRF
    java.lang.ClassNotFoundException: org.apache.catalina.filters.CsrfPreventionFilter
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            ...
    

    This exception was raised because I used a version of tomcat that hadn't CSRF prevention filter. Tomcat 6.0.24 doesn't have the CSRF prevention filter in it. The first version that has it is the 6.0.30 version (at least. according to the changelog). As a result, Tomcat Manager was uncompatible with version of Tomcat that I used. I've digged description of this issue here: http://blog.techstacks.com/.m/2009/05/tomcat-management-setting-up-tomcat/comments/

    Steps to fix it:

    1. Check version of tomcat installed by running "sh version.sh" from your tomcat/bin directory
    2. Download corresponding version of tomcat
    3. Stop tomcat
    4. Remove your webapps/manager directory and copy manager application from distributive that you've downloaded.
    5. Start tomcat

    Now you should be able to access tomcat manager.

提交回复
热议问题