dispatcher-servlet.xml文件中的错误

时间:2015-07-16 06:08:16

标签: java xml spring spring-mvc servlets

我是初学mvc框架工作的新手。我试图做2个helloworld Web应用程序,但我没有这样做。原因是如下所示(这个错误发生在dispatcher-servlet.xml页面......在截图,其名称为welcome-servlet.xml,而不是在web.xml中)

引用文件包含错误[以下网址是我的错误](http://www.springframework.org/schema/context/spring-context-3.0.xsd

欢迎-servlet.xml中

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">

<context:component-scan base-package="java4s" />

<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/jsp/" />
<property name="suffix" value=".jsp" />
</bean> 
</beans>

这是我的两个项目中的错误。这里发生了什么?如何解决这些错误?为什么它在我的项目中都很常见?

   I change the version of all these to 2.5 and 3 and tested.But the same error shows.

我正在使用库文件(不是maven)。感到非常困惑该怎么做......

我添加了教程http://www.java4s.com/spring-mvc/spring-mvc-hello-world-spring-mvc-3-2-hello-world-example-in-eclipse/(I中指定的所有依赖项,彻底重新检查了它,所有的jar都在我的程序中,并且版本在指定时是正确的。)

Nb:我知道最新的春季mvc(4个版本),由于我办公室的限制,我无法使用它。enter image description here

任何人都可以帮助我。任何帮助都会非常明显(在这个错误中浪费了一整天)

0 个答案:

没有答案