Galera, estou fazendo a apostila FJ21 da caelum, já terminei a parte de Spring MVC e Hibernate, e agora eu queria unir os dois frameworks.
Peguei os dois projetos que havia feito (um em cada framework) e resolvi aplicar o Hibernate aonde já estava com Spring.
Não fiz nada demais, apenas declarei as classe de modelo como @Entity e mais poucas coisas. Copiei todos os .jars do Hibernate para a pasta lib e importei pra o build path.
Porém, quando eu vou rodar a aplicação, da um erro informando que o Servlet esta indisponível (unavailable).
Segue meu web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>fj21-tarefas</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring-context.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
e o Spring Context
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
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="br.com.caelum.tarefas" />
<mvc:annotation-driven />
<mvc:resources mapping="/resources/**" location="/resources/" />
<mvc:interceptors>
<bean class="br.com.caelum.tarefas.interceptor.AutorizadorInterceptor" />
</mvc:interceptors>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>
E o erro que o eclipse apresenta: 20/06/2012 11:18:03 org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet Spring MVC Dispatcher Servlet is currently unavailable
Já busquei em um milhão de sites e achei várias pessoas com o mesmo problema, mas nenhuma com a respota.
Alguém poderia dar uma força?
Obrigado!