Win a copy of The Java Performance Companion this week in the Performance 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

 
Rajesha Acharya
Greenhorn
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" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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){
document.forms["theForm"].action="submitpendingreport?userid="+i;
document.forms["theForm"].submit();
return true;
}else{alert("Press correct Button");
return false;
}
}
</script>
</head>

<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>
</tr>
<tr>


<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>
</blockquote></td>

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




<TABLE BORDER="1" >
<TR>
<TH width="1px">id</TH>
<TH>Subject</TH>
<TH>Action</TH>
<TH>Status</TH>

</TR>



<s:iterator value="reportList" var="record">
<TR>
<TD> <s:property value="#record.id"/> </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(%{#record.id})"/> <s:submit onclick="submitFunction(%{#record.id})"/> </TD>
<TD> <s:property value="#record.reportStatus"/> </TD>
</TR>

</s:iterator>

</TABLE>
</td>
</tr></table>
</s:form>
</body>
</html>
 
Rajesha Acharya
Greenhorn
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