Results 1 to 1 of 1
- 06-09-2011, 09:38 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 1
- Rep Power
- 0
Problem in designing the JSP with struts tag
I am using struts2 in my JSP, but the the HTML rendering of the JSP page is not being done properly.
I want to display multiple struts tag fields in one row of a table.
But every struts field is rendered as a separate table row in the browser.
Here's my JSP code.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
</head>
<body>
<table>
<tr>
<td><s:textfield></s:textfield> </td>
<td><s:textfield></s:textfield></td>
<td><s:textfield></s:textfield></td>
</tr>
</table>
</body>
</html>
This is the generated HTML.
Every struts tag rendered in separate table row
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
</head>
<body>
<table>
<tr>
<td><tr>
<td class="tdLabel"></td>
<td
><input type="text" name="" id=""/></td>
</tr>
</td>
<td><tr>
<td class="tdLabel"></td>
<td
><input type="text" name="" id=""/></td>
</tr>
</td>
<td><tr>
<td class="tdLabel"></td>
<td
><input type="text" name="" id=""/></td>
</tr>
</td>
</tr>
</table>
</body>
</html>
Please help out with this
Similar Threads
-
Designing a project in Java
By avisik in forum New To JavaReplies: 0Last Post: 11-23-2010, 07:28 PM -
Help designing a program
By np2392 in forum New To JavaReplies: 2Last Post: 09-24-2010, 02:31 AM -
decorator.jsp problem building Struts Menu in JSP when Struts action is used
By dkirvan in forum JavaServer Pages (JSP) and JSTLReplies: 3Last Post: 04-29-2010, 05:33 AM -
Problem in JSP Page Designing
By vinothkumarrvk in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 03-10-2010, 06:16 AM -
Need help for coding and designing
By g.ganiraju in forum New To JavaReplies: 11Last Post: 11-01-2008, 04:49 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks