IHeartU 2014-02-21 02:17
浏览 1317

Struts框架初学者问题,HTTP Status 404

刚刚接触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
















能不能帮我看一下,哪里有问题,感激不尽!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 安装pyaudiokits失败
    • ¥15 计组这些题应该咋做呀
    • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
    • ¥15 让node服务器有自动加载文件的功能
    • ¥15 jmeter脚本回放有的是对的有的是错的
    • ¥15 r语言蛋白组学相关问题
    • ¥15 Python时间序列如何拟合疏系数模型
    • ¥15 求学软件的前人们指明方向🥺
    • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
    • ¥20 双层网络上信息-疾病传播