struts2 The requested resource (/struts2/test/helloworld) is not available.struts.xml/WEB-INF/page/hello.jsp web.xml struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /*

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/12 10:50:29

struts2 The requested resource (/struts2/test/helloworld) is not available.struts.xml/WEB-INF/page/hello.jsp web.xml struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /*
struts2 The requested resource (/struts2/test/helloworld) is not available.
struts.xml





/WEB-INF/page/hello.jsp




web.xml




struts2
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter


struts2
/*



index.jsp


hello.jsp







My JSP 'hello.jsp' starting page








${message}


HelloWorldAction.java
package cn.itcast.action;
public class HelloWorldAction {
private String message;
public String getMessage() {
return message;
}
public String execute(){

message="这是我的第一个struts2应用";
return "success";
}
}

struts2 The requested resource (/struts2/test/helloworld) is not available.struts.xml/WEB-INF/page/hello.jsp web.xml struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /*
看看你的page放哪了? 路径应该是 : WebRoot/WEB-INF/page/hello.jsp 
项目的属性看看Web Context-root是什么,看看你的访问路径 /struts2/test/helloworld 是否正确,
注意与 Web Context-root 一致.