Link to home
Get AccessLog in
Avatar of naFianna
naFiannaFlag for Ireland

asked on

Assign value to html table element attribute with value from scriptlet


I would like to set the class and id attributes of the <td> element that is being populated in the scriptlet below

columns is a list of column names

This could contain strings such as accountno, name

history is a data bean

	methodName = columns.getId();

Open in new window

Best regards and thanks
Avatar of Kim Walker
Kim Walker
Flag of United States of America image

Link to home
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access
Avatar of naFianna


Hi sorry i should have said that the scriptlet is inside a jsp page and the scriptlet language is java

I could not see the wood for the trees and then realised that i can use this

<td class="<%=columns.getId()%>" id="<%=columns.getId()%>">

Open in new window

thanks for the pointer, i was able to get to it from your suggestion

Also you are correct columnlist is a list of simpledatabean with an id and value