File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts2 <s:form> includes empty <td> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 <s:form> includes empty <td>" Watch "Struts2 <s:form> includes empty <td>" New topic

Struts2 <s:form> includes empty <td>

Saravanan Vijayappan
Ranch Hand

Joined: Jan 02, 2007
Posts: 47
Empty TD is included in struts2 form. Please have a look at the below my JSP code snippet below.

Generated html code in browser is below for the above code

Why this line of empty <td> is generated ? - <td class="tdLabel"></td>

I really could not find out a way to get rid of this <td> ? Could any one please help me?. Thanks

Cheers,<br />Sarav
David Newton

Joined: Sep 29, 2008
Posts: 12617

Because you have no label for your radio button.

The default theme, "xhtml", puts form elements in tables. You may want to read some of the S2 documentation regarding themes and templates.
Saravanan Vijayappan
Ranch Hand

Joined: Jan 02, 2007
Posts: 47
Thank you., that helped me, I am going to use theme="simple" and manually going to create <table>
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Struts2 <s:form> includes empty <td>
Similar Threads
unable to do validation for select in struts2
How to "enable/disable" radio button in struts2 on click of check box
document.forms[0].submit(); throws Invalid Argument in IE
Jsp is not displaying in Struts2
iterate problem in struts2