Я следую этому руководству, чтобы настроить весну в моей системе, http://www.roseindia.net/spring/spring-mvc-hello-world.shtml.ошибка с запуском простого весового приложения
Вот мой файл web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd" >
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
диспетчер-servlet.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
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.xsd">
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/jsp/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<bean id="urlMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="interceptors">
<list>
<ref local="localeChangeInterceptor"/>
</list>
</property>
<property name="urlMap">
<map>
<entry key="/hello.html">
<ref bean="helloController"/>
</entry>
</map>
</property>
</bean>
<bean id="helloController" class="net.roseindia.web.HelloWorldController"> </bean>
<bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
<property name="paramName" value="hl"/>
</bean>
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver"/>
</beans>
Я получаю эту ошибку:
HTTP Status 404 - Servlet dispatcher is not available
--------------------------------------------------------------------------------
type Status report
message Servlet dispatcher is not available
description The requested resource (Servlet dispatcher is not available) is not available.
Что может быть проблемой ? Я добавил библиотеки через путь сборки проекта, а также в папку lib web-inf.
Я бы очень опасался всего, что я нашел на Роуз Индии. Я не думаю, что это хороший сайт для изучения, как вы уже узнали. Почему бы тебе не пойти на собственный сайт Спринг и не изучить их? И используйте Spring 3, пока вы на нем; теперь они до версии 3.1. – duffymo