| Author |
is Name attribute requried for Action element
|
Parameswaran Thangavel
Ranch Hand
Joined: Mar 01, 2005
Posts: 485
|
|
Hi all i am working in a struts proj. When i tried to map a url to a action which doesn't need bean, i didn't gave the name attribute... But by doing so i get the below error..... Cannot retrieve definition for form bean why its so, on giving the name attribute pointing to someother form bean, struts framework doesn't throw any error why its so???
|
 |
Dom Lassy
Ranch Hand
Joined: May 05, 2006
Posts: 181
|
|
Do you omit name altogether or do you do name=""? I think you will have a problem if you do name="".
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
It is definitely OK to leave out the name attribute when defining an action. I do this all the time, and don't get the error you mentioned. Could you show us more of your code? One thing you should be aware of is that it is not ok to leave out the name attribute if you use the action in an <html:form> tag. In this case it is mandatory.
|
Merrill
Consultant, Sima Solutions
|
 |
Parameswaran Thangavel
Ranch Hand
Joined: Mar 01, 2005
Posts: 485
|
|
Hi Merrill You r right i am using html:form so in this case, name is mandatory.
|
 |
 |
|
|
subject: is Name attribute requried for Action element
|
|
|