This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

struts2 tag produces unwanted tr and td tags which effects my design so it give rise to design issue

Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello sir. i recently started to learn struts2 directly without having any knowledge on struts1. i already started up with my first project to upload files using struts2. i have completed this project by my own, so functionality works very fine but i have an issue with the design. struts2 framework unwantedly produce tr and td tags so when output is displayed on the jsp page, it will sit in different blocks, so please help me out with this design issue with the struts2.
here is my code.

<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<style type="text/css">@import url("menu.css");</style>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

<script language="javascript" type="text/javascript">
var x = 0;
function submitFunction1(y){
x = y;

function submitFunction(i)
if(i == x){
return true;
}else{alert("Press correct Button");
return false;

<body background="images/bg27.jpg">
<s:form id="theForm" method="post" enctype="multipart/form-data" >
<h2><font sytle="text-align:left" color="red"> <strong>Welcome <s:property value="#session.a" />

<p align="left" > Admin Page<p>

<center><strong><p style="font-family:verdana;color:red;">Welcome To Student Assignment/Report Submission form</p></center></strong>
<table width='100%' height='90%' border='1'>
<tr align='center'>
<td height='39' colspan='2'>
<strong><a href="user.jsp">Home</a>         
<a href="AboutUs.jsp">AboutUs</a>         
<a href="Geneology.jsp">Geneology</a>         
<a href="Clients.jsp">Clients</a>         
<a href="ContactUs.jsp">ContactUs</a>         
<a href="Logout.jsp">LogOut</a></strong></td>

<td width='18%' height='500' valign='middle'><p> </p><blockquote>
<a href="pendingreports">View Pending Report</a><br/><br/><br/>
<a href="Submitreport.jsp">Submit Report</a><br><br><br>
<a href="viewsubmit">View Submitted Report</a><br><br><br>

<td width='82%' colspan='2' align="left" >

<TH width="1px">id</TH>


<s:iterator value="reportList" var="record">
<TD> <s:property value=""/> </TD>
<TD> <s:property value="#record.subject"/> </TD>
//i get here in this line, this line produces unwanted tr and td tags// <TD> <s:file name="pending" onchange="submitFunction1(%{})"/> <s:submit onclick="submitFunction(%{})"/> </TD>
<TD> <s:property value="#record.reportStatus"/> </TD>


Rajesha Acharya
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Joe Ess wrote:Struts 2 FAQ: Why do the form tags put table tags around controls?

thanks but i figured it out, i was missing theme=simple on my <form>
It's a beautiful day in this neighborhood - Fred Rogers. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!