I am working through a tutorial
http://javaboutique.internet.com/tutorials/Struts/jsp_page.html and of course it does not work immediately so I am comparing the bits to struts-blank and struts-example as distributed. My error is:
org.apache.jasper.JasperException: Cannot retrieve definition for form bean null
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
etc
Here are my bits and pieces
SubmitForm.java
package playground;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;
public final class SubmitForm extends ActionForm {
============
struts-config.xml
<form-beans>
<form-bean name="submitForm"
type="playground.SubmitForm" />
</form-beans>
<global-forwards>
<forward name="submit"
path="/submit.do"/>
</global-forwards>
<action-mappings>
<action path="/submit"
type="playground.SubmitAction"
attribute="submitForm"
scope="request"
input="/submit.jsp"
validate="false">
<forward name="success" path="/submit.jsp"/>
<forward name="failure" path="/submit.jsp"/>
</action>
</action-mappings>
============
Submit.jsp
<html:form action="submit" >
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">
<html
ption value="a">0-19</html
ption>
<html
ption value="b">20-49</html
ption>
<html
ption value="c">50-</html
ption>
</html:select><br>
<html:submit/>
</html:form>
I enter
http://localhost/strutsApp/index.jsp which does
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<logic:redirect forward="submit"/>
the URL changes to
http://localhost/strutsApp/submit.do I tried adding some of the parameters mentioned above to the form but they all produced new errors. For example when I added attribute there was a message about the tld. I have not found discussion of when it is name="myform" and when it is attribute="myform". Also find the changes from dots to slashes in URL/ URI / directory description mysterious.
Any wise words welcome.