日期:2014-05-18  浏览次数:20645 次

struts2配置问题,出现404的错误
小弟最近刚学struts2,找了一个教程,试着编写了一个例子,但是运行老出404的错误,在网上查了这类错误说是配置的路径不对,但具体不知道是哪里错了,希望高手能解答下,
具体代码:
web.xml:

<?xml version="1.0" encoding="GBK"?>

<!-- web-app是Web应用配置文件的根元素,指定Web应用的Schema信息 -->

<web-app version="2.4" 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_4.xsd">

                                 <!-- 定义Struts 2的FilterDispatcher的Filter -->

                                  <filter>

                                    <!-- 定义核心Filter的名字 -->

                                  <filter-name>struts2</filter-name>

                                    <!-- 定义核心Filter的实现类 -->

                                  <filter-class>org.apache.Struts2.dispatcher.FilterDispatcher

                                        </ filter-class>

                                  </filter>

                                 <!-- FilterDispatcher用来初始化Struts 2并且处理所有的Web请求 -->

                                  <filter-mapping>

                &nb