struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MaFai" <zh...@hkbn.com.hk>
Subject Newbie question about form name
Date Thu, 01 Jan 1970 00:00:00 GMT
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
zh-ma@hkbn.com.hk
2003-07-30


Mime
View raw message