File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes html:form id attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:form id attribute" Watch "html:form id attribute" New topic

html:form id attribute

Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
I'd like my forms to have the id attribute specified. Unfortunately, the standard struts-html.tld doesn't specify an id attribute for the form tag, so if one is added in the JSP using the html:form tag, a problem occurs at runtime complaining that the TLD doesn't specify an id attribute. So, I edited the TLD and added one.
After editing it, I'm allowed to specify an id attribute to the html:form tag, but this id doesn't show up on the html page that is generated and sent to the web browser.
My question is, without editing org.apache.struts.taglib.html.FormTag, how do I get the form id attribute to show up when using the html:form tag? Is it even possible?
And then I have the same question concerning various other html elements, like html:text, html:password, html:submit, ...
[ April 10, 2004: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33106

It's styleId, instead of id.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
I agree. Here's the link:
subject: html:form id attribute
It's not a secret anymore!