Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Struts and the fly likes html:form tag in struts-html.tld Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:form tag in struts-html.tld" Watch "html:form tag in struts-html.tld" New topic

html:form tag in struts-html.tld

sai prasanna
Ranch Hand

Joined: May 02, 2005
Posts: 167
hi all,

if i need more than one form tag in a jsp it is recognized by its name while using struts-html.tld what is the attribute to specify the name of the form as it does not contain property attribute.

thanks in advance
ram gaurav
Ranch Hand

Joined: Mar 29, 2006
Posts: 208
In struts if you have more then 2 forms then you can use the following syntax to access different forms :


Try this !!!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
When you use the <html:form> tag, action is the only required attribute. Struts looks up the action in the struts-config.xml file and uses the name you gave to the action as the name of the form when it renders the <form> tag. So, if you specify:

<action path="/myAction" name="myForm" />

in your struts-config.xml file, and you specify:

<html:form action="/myAction" >

Struts will render this tag as:

<form name="myForm" action="" >

Consultant, Sima Solutions
sai prasanna
Ranch Hand

Joined: May 02, 2005
Posts: 167
I agree. Here's the link:
subject: html:form tag in struts-html.tld
Similar Threads
<html:link> with Struts
I am getting following error
Can we apply struts tag libraries like struts-html.tld to a servlet file?
'type' attribute for [html:form]
struts form bean