Your action is configured with a form name.

Lookup action element in your struts-config.xml, 
Attribute of interest there is 'name' is the name of the form.
When you specify action in your html:form Struts connects the 
dots for you.

That form will be used to populate values of <html: elements 
On your JSP page.

HTH,
Alex.

> -----Original Message-----
> From: MaFai [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 30, 2003 8:01 AM
> To: [EMAIL PROTECTED]
> Subject: Newbie question about form name
> 
> Hello, struts-user,
> 
> Sth make me confused while reading the type.jsp,one of examples in
Tomcat
> Strut struts-validator.war.
> 
> The following is the souce code.
> <html:form action="type">
>   <html:hidden property="action"/>
> 
> My question:
> why the form doesn't need the form name and form type.
> 
> For my limited skill,I would write this code:
> <html:form action="type3"
>       name="myform"
>       type="my.TypeForm2">
> 
> Do the form name has default name? But I think the type should
hardcode in
> the jsp page.
> 
> In strut-config.xml
> 
>     <!-- Type Action -->
>     <action    path="/type"
>                type="org.apache.struts.webapp.validator.TypeAction"
>                name="typeForm"
>                scope="request"
>                validate="true"
>                input="/type2.jsp">
>        <forward name="success"              path="/index.jsp"/>
>     </action>
> 
> The form type (TypeForm object) doesn't contain the form type,but the
> action form type is specified.
> 
> 
> 
> 
> Best regards.
> 
> MaFai
> [EMAIL PROTECTED]
> 2003-07-30



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to