现在我正在使用Apache Tomcat服务器。我用Struts框架编写了一个项目。 我的jsp页面无法运行。每当我跑步时,Module' null'找不到错误。我该如何解决这个错误?
这是signup1.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<html:form action="/SignUpPath">
First Name<html:text property="first"></html:text>
LastName<html:text property="last"></html:text>
Email<html:text property="email"></html:text>
Phone<html:text property="phone"></html:text>
<html:submit value="Login"></html:submit>
</html:form>
</body>
</html>
这是struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<struts-config>
<form-beans>
<form-bean
name="SignUpName"
type="presentation.form.SignUpForm">
</form-bean>
</form-beans>
<action-mappings>
<action
path="/SignUpPath"
type="presentation.action.SignUpAction"
name="SignUpName"
scope="request"
input="/jsp/signup1.jsp">
<forward name="success" path="/jsp/signup2.jsp"></forward>
</action-mappings>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"
value="/org/apache/struts/validator/validator-rules.xml,
/WEB-INF/validation.xml"/>
</plug-in>
</struts-config>
这是SignUpAction.java
package presentation.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class SignUpAction extends Action{
public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest req,HttpServletResponse rep)
{
System.out.println("You are now in ActionClass");
return mapping.findForward("success");
}
这是SignUpForm.java
package presentation.form;
public class SignUpForm {
private String first;
private String last;
private String email;
private String phone;
public String getFirst() {
return first;
}
public void setFirst(String first) {
this.first = first;
}
public String getLast() {
return last;
}
public void setLast(String last) {
this.last = last;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
}
这是错误Error Screenshot