我用netbeans配置struts2
首先 我下载了所有jar 并且引入
新建web.xml 在 WEB-INF:http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"><display-name>Basic Strust 2 Project setup on Glassfish 3.0.1</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>
然后我新建了 struts.xml在 WEB-INF:<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "/WEB-INF/classes/struts-2.1.7.dtd"><struts>
    <!--
    You could also set the constatnts in the struts.properties file
    placed in the same directory as struts.xml
    -->
    <constant name="struts.devMode" value="true" />    <package name="test" extends="struts-default" namespace="/">        <!--
        If no class attribute is specified the framework will assume success and
        render the result index.jsp
        If no name value for the result node is specified the success value is the default
        -->
        <action name="help">
            <result>/help.jsp</result>
        </action>    </package></struts>
然后我根目录新建了个help.jspAlso, I built the action class help:import com.opensymphony.xwork2.ActionSupport;public class help extends ActionSupport{
    @Override
    public String execute() throws Exception {
        return SUCCESS;
    }
}
我觉得现在我不需要这个因为我只是想看看router怎么工作但是我运行时候 出现这个错误 HTTP Status 404 - There is no Action mapped for namespace [/] and action name [help] associated with context path [/131X].