if you are using tomcat 4 or 5, its a problem specifying the form name in
attribute, coz tomcat uses referential integrity.

your struts-config.xml should have an entry for form

<form-bean name = "MyForm">
 <form-property = "formfieldname" type = "java.lang.String" />
</form-bean>

<action path = "/myactivity"
  name = "MyForm" >
  <forward name = "success" path = "/path/to/jsp or tile definition" />
</action>

---------------
your JSP
 <html:form action = "/myactivity.do" method = "get">
  .......
 </html:form>

---------------

your JS coding...
 document.forms[formIndex].formProperty

---------------
refer using form index in JS instead of name.

hope this if of some help.
Regards,
Sunny


> I have a html:form like this
>
> <html:form name="myform" type="org.apache.struts.taglib.html.FormTag",
> it  throw class cast excetion, what is the correct value of type?
>
> you know ,I need to use name to refer to this form in javascript ..
>
> Thanks&Regards
> Mike
>
> _________________________________________________________________
> 与联机的朋友进行交流,请使用 MSN Messenger:
> http://messenger.msn.com/cn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]





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

Reply via email to