更新时间:2022-01-08 01:01:32
实际上,问题在于在Tomcat 6下,我已经覆盖了默认servlet的定义.
In fact the problem was that under Tomcat 6, I had overrided the definition of the default servlet.
搜索了很长时间之后,我尝试注释默认的servlet定义...并且一切正常.
After having searched long times and long times, I tried commenting the default servlet definition... and everything worked.
因此,在web.xml中,注释以下几行以使它们相同:
So in web.xml, comment the following lines to have the same :
<!--
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.png</url-pattern>
<url-pattern>*.js</url-pattern>
<url-pattern>*.css</url-pattern>
<url-pattern>*.gif</url-pattern>
</servlet-mapping> -->
它修复了所有问题.