Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Rajesha Acharya
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

thanks but i figured it out, i was missing theme=simple on my <form>
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!