403 error when tomcat as image server

It's okay to mess with tomcat as a picture server. When the picture is uploaded to the picture server, it returns a 403 error

Scratched and checked the debug configuration file file path code logic without errors

Finally found that ... NM tomcat can not write by default

Solution:

                   Find tomcat's web.xml configuration file to add code

<servlet>
        <servlet-name>default</servlet-name>
        <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>readonly</param-name>
            <param-value>false</param-value>
        </init-param>

        <init-param>
            <param-name>listings</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

 

Published 12 original articles · praised 7 · 20,000+ views

Guess you like

Origin blog.csdn.net/tl1242616458/article/details/105213682
Recommended