在jsp引入js失败,提示404找不到该文件,

为什么呢?后来想起我使用的是springmvc,在配置的时候可能会影响到静态文件的使用,如js、css。

解决方法:

在springMvc配置文件springMVC-servlet.xml中加入

<mvc:annotation-driven/>

<mvc:default-servlet-handler/>

就可以了。

posted on 2020-12-15 14:13  itprobie-菜鸟程序员  阅读(414)  评论(0)    收藏  举报