Hello,
I am brand spanking new to struts.
I am trying to build a very simple application with struts. In fact I am trying to replicate one available here
This is my struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"
<struts-config>
<!-- ========== Form Bean Definitions ================= -->
<form-beans>
<form-bean name="submitForm"
type="hansen.playground.SubmitForm"/>
</form-beans>
<!-- ========== Action Mapping Definitions ============ -->
<action-mappings>
<action path="/submit"
type="hansen.playground.SubmitAction"
name="submitForm"
input="/submit.jsp"
scope="request">
<forward name="success" path="/submit.jsp"/>
<forward name="failure" path="/submit.jsp"/>
</action>
</action-mappings>
</struts-config>
In web-inf directory I have 2 classes
WEB-INF\classes\hansen\playground\SubmitAction.java
and
WEB-INF\classes\hansen\playground\SubmitForm.java
In my application root (for luck of the better term) directory
I have submit.jsp file and this is the code
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html>
<head><title>Submit example</title></head>
<body>
<h3>Example Submit Page</h3>
<html:errors/>
<html:form action="submit.do">
Last Name: <html:text property="lastName"/><br>
Address: <html:textarea property="address"/><br>
Sex: <html:radio property="sex" value="M"/>Male
<html:radio property="sex" value="F"/>Female<br>
Married: <html:checkbox property="married"/><br>
Age: <html:select property="age">
<htmlption value="a">0-19</htmlption>
<htmlption value="b">20-49</htmlption>
<htmlption value="c">50-</htmlption>
</html:select><br>
<html:submit/>
</html:form>
</body>
</html>
When I tried to run the app I got exception
org.apache.jasper.JasperException: Exception creating bean of class hansen.playground.SubmitForm: {1}
Does it mean that I set something wrong in my struts-config.xml or does it mean that there is something wrong with the file ?
Thanks
I am brand spanking new to struts.
I am trying to build a very simple application with struts. In fact I am trying to replicate one available here
This is my struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"
<struts-config>
<!-- ========== Form Bean Definitions ================= -->
<form-beans>
<form-bean name="submitForm"
type="hansen.playground.SubmitForm"/>
</form-beans>
<!-- ========== Action Mapping Definitions ============ -->
<action-mappings>
<action path="/submit"
type="hansen.playground.SubmitAction"
name="submitForm"
input="/submit.jsp"
scope="request">
<forward name="success" path="/submit.jsp"/>
<forward name="failure" path="/submit.jsp"/>
</action>
</action-mappings>
</struts-config>
In web-inf directory I have 2 classes
WEB-INF\classes\hansen\playground\SubmitAction.java
and
WEB-INF\classes\hansen\playground\SubmitForm.java
In my application root (for luck of the better term) directory
I have submit.jsp file and this is the code
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html>
<head><title>Submit example</title></head>
<body>
<h3>Example Submit Page</h3>
<html:errors/>
<html:form action="submit.do">
Last Name: <html:text property="lastName"/><br>
Address: <html:textarea property="address"/><br>
Sex: <html:radio property="sex" value="M"/>Male
<html:radio property="sex" value="F"/>Female<br>
Married: <html:checkbox property="married"/><br>
Age: <html:select property="age">
<htmlption value="a">0-19</htmlption>
<htmlption value="b">20-49</htmlption>
<htmlption value="c">50-</htmlption>
</html:select><br>
<html:submit/>
</html:form>
</body>
</html>
When I tried to run the app I got exception
org.apache.jasper.JasperException: Exception creating bean of class hansen.playground.SubmitForm: {1}
Does it mean that I set something wrong in my struts-config.xml or does it mean that there is something wrong with the file ?
Thanks