刚刚接触ssh框架,自己正在慢慢学习中,昨天写了一个很简单的登录界面,结果一直有问题,进不去。报错:The requested resource (/EasyModel/) is not available.
下面是配置文件:
Web.xml
<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext.xml </param-value>
</context-param>
Struts.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
/success.jsp
/error.jsp
</package>
applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!-- 配置SessionFactory -->
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<!-- 配置Hibernate的属性 -->
org.hibernate.dialect.MySQLDialect
true
<!-- 指定HIbernate映射文件的路径 -->
com/integration/entity/User.hbm.xml
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/mysqldb
root
root
能不能帮我看一下,哪里有问题,感激不尽!