struts2 跳转
给位大侠帮帮忙
我做了一个假单的struts2.0的一个提交,总是No configuration found for the specified action 这个错误
这是SayHello.jsp 页面
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Say Hello</title>
</head>
<body>
<h3>Say "Hello" to: </h3>
<s:form name="HelloWorld" action="HelloWorld" namespace="/example">
Name: <s:textfield name="name" />
<s:submit></s:submit>
</s:form>
</body>
</html>
这是HelloWorld.jsp页面
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Hello</title>
</head>
<body>
<h3><s:property value="name" /></h3>
</body>
</html>
这是HelloWorld.java
package tutorial;
import com.opensymphony.xwork2.ActionSupport;
public class HelloWorld extends ActionSupport {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
System.out.println(name);
this.name = name;
}
public String execute()throws Exception {
name = "Hello, " + name + "!";
System.out.println(name);
return SUCCESS;
}
}
这是配置文件
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<include file="struts-default.xml"/>
<package name="tutorialone" extends="struts-default" namespace="/example">
<action name="HelloWorld" class="tutorial.HelloWorld">
<result>HelloWorld.jsp</result>
</action>
</package>
</struts>
请各位大侠帮帮忙吧