Could not open ServletContext resource [/WEB-INF/springmvc-servlet.xml]
转自搭建Spring 的mvc框架的时候报出来这个错误,其中可能有几个原因springMVCorg.springframework.web.servlet.DispatcherServlet2springMVC*.do上面的代码是在web.xml中配置的,加载的就是*-servlet.xml文件,当前默认加载的是spri
转自:http://duanmumu.blog.163.com/blog/static/19111335020126259546928/
搭建Spring 的mvc框架的时候报出来这个错误,
<servlet> <servlet-name>springMVC</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>springMVC</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping>
<servlet>
<servlet-name>springMVC</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class><init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/pringMVC-servlet.xml</param-value> </init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springMVC</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>则*-servlet.xml文件命名随便写了。
更多推荐
所有评论(0)