struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barett McGavock <>
Subject RE: struts repopulate bug?
Date Wed, 05 May 2004 21:08:18 GMT

The documentation for the name attribute of the form element says: "If not
specified, the bean associated with the form tag we are nested within is

If the name, type and scope matched those defined for the action you
specified, I would expect Struts to have pulled the correct pre-existing
bean. Otherwise, I would expect it to create a new, empty bean as you saw. I
haven't seen the behavior from the first sentence before; I guess I've
gotten in the habit of specifying either action xor name/type.

If the error really bothers you, consider checking out the struts source to
see if this is handled incorrectly!


> -----Original Message-----
> From: Dana Hata [] 
> Sent: Tuesday, May 04, 2004 7:39 PM
> To: Struts Users Mailing List
> Subject: RE: struts repopulate bug? <solved>
> Problem solved.  Apparently, if you have the name and type 
> attributes defined in the html:form tag, it causes this 
> behavior.  As in:
> <html:form action="MyAction" name="myForm" 
> type="com.blah.blah.MyForm">
> I simply changed that to:
> <html:form action="MyAction">
> And now the form gets repopulated.  Is this obvious to 
> everyone else, or does anyone else think struts should be 
> more resilient?  Also, can someone explain what actually 
> happened in the first one?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message