Help with JSP and Servlets
Hi,
How would I create an editable JSP form from JDBC?
I know how to retrieve the data from JDBC, but I'm still trying to figure out how to take that table data and format it into a tabluar format that user can make changes to it.
Thanks,
Tom
Message was edited by:
bztom_33
Message was edited by:
bztom_33
[364 byte] By [
bztom_33a] at [2007-11-26 18:22:30]

# 1
CreateConnection();
logger.info("Database connection opened in Testimonials");
String queryText = "LOCK TABLE testimonials WRITE,posting_table WRITE";
int numOfRows = st.executeUpdate(queryText);
rs = st.executeQuery(SELECT_QUERY_FROM_TESTIMONIALS);
logger.info("Query executed postingVeiw");
String queryText1 = "UNLOCK TABLES";
int numOfRow = st.executeUpdate(queryText1);
while(rs.next())
{
ClientData client = new ClientData();
client.setName(rs.getString("name"));
client.setTestimonial(rs.getString("testimonial"));
client.setCompany(rs.getString("company"));
clientList.add(client);
}
RequestDispatcher disp = null;
req.setAttribute("clientlist", clientList);
String error1 = req.getParameter("");
disp = req.getRequestDispatcher("testimonial.jsp");
disp.forward(req,res);
And call this arraylist from the jsp page
Cheers
Varun Rathore