I want to avoid the addition of the <tr> tag when i am rendering the following code in struts2.

<s:textfield name="students[#stat.index].lastName" />
   <s:textfield name="students[#stat.index].firstName" />
   <s:textfield name="students[#stat.index].userName" />
   <s:textfield name="students[#stat.index].userPassword" />

textfield tag will add <tr> tag before each row. I want to avoid the addition of this tr tag. Can any body suggest me the solution.

THe main problem is that when i put these content in html table with 4 column then each text field come in different row and i am not able to create the row.

Please help if possible

Hi, your question has already been answered in this forum. I had the same problem with you, but later I found the answer and posted it. Take a look at this thread:


It has my question, similar to yours, as well as the answer.
One way would be to add the theme in each tag, but I don't agree with that solution, because it is better to declare the theme="simple" in a property file, as suggested at my second post, of that thread.