Yes, you *must* have a name attribute if you are going to use an <html:form>.

Here's a snippet from the docs for <html:form>

If the name and type attributes are not specified, then the form bean will be located, 
and created if necessary, based on the form bean specification for the associated 
ActionMapping

By the way, this is the default operation since name and type are deprecated.

Sri

-----Original Message-----
From: Chen, Gin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 26, 2003 1:05 PM
To: 'Struts Users Mailing List'
Subject: Action without FormBean


I set up the following:

<action path="/myAction" type="com.ui.action.MyAction" parameter="userAction"/>

//myJsp.jsp

<html:form action="/myAction">
</html:form>

Thats it nothing in between the form tags and I get exception can not access formbean 
null.

Well I dont want a formbean.
Is this not a legal form?

I do this all the time from anchor hrefs but this is the first time I've tried it in 
html:form style. I can't find anywhere in the docs that says that a html:form MUST 
have a related formbean. Is this just an implied rule?

---------------------------------------------------------------------
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