Eclipse上运行到这个阶段的代码时,tomcat报500错误,说是找不到上下文,跪求解决
Eclipse上运行到这个阶段的代码时,tomcat报500错误,说是找不到上下文,跪求解决
Eclipse上运行到这个阶段的代码时,tomcat报500错误,说是找不到上下文,跪求解决
2019-01-27
web.xml里配置了上下文监听器了吗
<!-- 读取上下文参数的监听器类 --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <display-name>DispatcherServlet</display-name> <servlet-name>DispatcherServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:spring-mvc.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>DispatcherServlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
举报