私が文書を正しく誤解したので、問題はばかげているようです。基本的には、hello.jspファイルをWEB-INF / contentに追加してlocalhost:8080 / test / helloを実行するだけで、この指示に従ってhello-worldアクションレスの例を実行したいのですが、Strutsは例外java.langを表示し続けます。 NoSuchMethodException:com.opensymphony.xwork2.ActionSupport.index()。
ですから、実行する前に構成を行う必要があるのではないかと思います。hello-worldの例の構成については何も見つかりませんでした。
誰かが私に正しい方法を提案できますか?ありがとう
更新:ここにプロジェクトツリーがあり、アクションもファンシーもありません。
├── pom.xml
└── src
└── main
├── resources
│ └── struts.xml
└── webapp
├── WEB-INF
│ ├── content
│ │ └── hello.jsp
│ └── web.xml
└── index.jsp
pom.xmlの依存関係
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.3.8</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-plugin</artifactId>
<version>2.3.8</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>2.3.8</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>2.3.8</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.26</version>
</dependency>