I need to create dynamic table in jsp and submit data to the server. What is the best way to do this?
Anyone has sample code?

thanks in advance,

Here is an example for the 1st part (creating a dynamic table) using JSP. You can only do this if you have the JSTL libraries. If you don't have them, you will need to use Java to generate the tags. Let us know if you need an example of that:

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"  %>

<!-- Quirk on -->
<!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">

<script language="Javascript" type="text/javascript" src="/ajax/ajaxLib.js">

<script language="Javascript" type="text/javascript">

	function loadRpt() {
		loadXmlData("http://wfgsust.pp.iw.gm.com/darItem.jsp?time=" + new Date().getTime(),"itmFrame","nothing");		


<body onLoad="loadRpt();">
	<% out.write( "Testing .." +  request.getHeader("cn")); %>
	<c:forEach var="hdr" items="${headerValues}">
		<td><c:out value="${hdr.key}"/></td>
			<c:forEach var="val" items="${hdr.value}">
				<td><c:out value="${val}"/></td>
	<td>User ID:</td>	
	<div id="tabFrame">
		<form name="tabForm" >
		Testing Ajax....
		<input name="myId" type="text" />
		<input type="button" value="Refresh" onclick="loadRpt();"/>
	<div id="itmFrame" style="height:500px; width:500px;">
	<!~-   -->

There are different ways to submit data. Do you want the users to fill out a form and submit that data?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.