How to set the ID attribute in struts html tag?

How to set the ID attribute in Struts HTML tag?

In Struts, there is no "ID" attribute present in HTML tag. In order to set the ID attribute , use "styleId" attribute of tag when using Struts HTML tag library. For example, have a look at the following code.

<html:text styleId="name" property="name" style="width:157px;" />

Search