求大神帮助  快一天了,几乎网上所有的方法都试过了,就是没法解决。求解决web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" id="WebApp_9"> 
<display-name>Struts Blank</display-name> 
  <filter>  
        <filter-name>struts2</filter-name>  
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>  
    </filter>  
  
    <filter-mapping>  
        <filter-name>struts2</filter-name>  
        <url-pattern>/*</url-pattern>  
    </filter-mapping>
 </web-app>struts2.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "http://struts.apache.org/dtds/struts-2.3.dtd" 
 "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN">
<struts>
<package name="default" namespace="/" extends="struts-default">        <action name="hello">
            <result>
                /Hello.jsp
            </result>
        </action>
    </package>
</struts>访问路径:http://localhost:8080/struts2/hello错误代码:
type Status reportmessage There is no Action mapped for namespace [/] and action name [hello] associated with context path [/struts2].description The requested resource (There is no Action mapped for namespace [/] and action name [hello] associated with context path [/struts2].) is not available.

解决方案 »

  1.   

    <action name="zoom" class="com.taoway.action.ZoomAction">
    <result name="ok" type="redirect">/state.jsp?err=${err}&amp;mfFileName=${picture}&amp;step=3
    </result>
    </action>
      

  2.   

      这里是直接跳转到网站根目录下的/Hello.jsp文件   没经过class类
      

  3.   

    额...我不知道struts2有这功能,我试了下,貌似struts.xml都编译不过去啊,会报错。
      

  4.   

    LZ,不介意这样直接写,
    如果你是直接action进入一个页面,而不做任何业务操作的话,强力建议,如果是管理系统,在对应的权限管理里面直接配置jsp地址。。
    action 常规的都会有class 和method,
      

  5.   

    class , method都没有的。<action name="SingleLoginAction" class="LoginAction"
    method="SingleLoginLink">
    <result name="success"></result>
    </action>还有配置文件呢
      

  6.   

    我的struts.xml是这样配置的,可以运行,error.jsp放在WEB-INF/jsp文件夹下面:
     <action name="hello">
                 <result>
                     /WEB-INF/jsp/error.jsp
                 </result>
             </action>
      

  7.   

    如果想练习struts2最好加几个类进来,那样你就更明白,单独一个jsp体会不到问题根源。
      

  8.   

     发一个你看一下
    web.xml文件
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    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>index.jsp</welcome-file>
    </welcome-file-list> <filter>
    <filter-name>struts-cleanup</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>struts-cleanup</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>

    <!-- 定义Spring的装载器 -->
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml  
            </param-value>
    </context-param>
    <!-- 监听Spring装载器 -->
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener> <filter>
    <filter-name>struts2</filter-name>
    <filter-class>
    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    </web-app>
    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">
    <struts>
    <!-- struts2解决编码问题 -->
    <constant name="struts.i18n.encoding" value="UTF-8"></constant> <package name="Export" extends="struts-default" namespace="/">
    <action name="listArticles" class="incomeInfoAction">
    <result name="success">/articleList.jsp</result>
    </action>
    </package>
    </struts>