在tomcat的conf / web.xml中,修改
<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>listings</param-name> <param-value><span style="color:#ff0000;">false</span></param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet>
修改为:
<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>listings</param-name> <param-value><span style="color:#ff0000;background-color: rgb(255, 255, 255);">true</span></param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet>