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 struts tags attribuits Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Html struts tags attribuits" Watch "Html struts tags attribuits" New topic

Html struts tags attribuits

Rami Hailat

Joined: Nov 26, 2008
Posts: 20
All of us know that using html struts tag like this
will be rendered in HTML like this What i want is to add some attribute in the HTML struts tags to be just copied to the corresponding rendered HTML tag. Is that possible ?

example to be
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
No, you cannot.

The custom tag is rendered based on the TLD file which holds its definition. Any attribute that you add which is not a part of the TLD for this tag [like the validate attribute you added in the example] will not be tolerated by struts, and an exception will be thrown at runtime.
David Newton

Joined: Sep 29, 2008
Posts: 12617

Note that the same isn't true for some S2 tags, but the S1 tags haven't gotten dynamic attribute support as of yet.
Rami Hailat

Joined: Nov 26, 2008
Posts: 20
Thank you
I agree. Here's the link:
subject: Html struts tags attribuits
It's not a secret anymore!