Displaying all records in view.jsp page

Sunday, March 7, 2010 Posted by Jagadeesh Manne
Document : view
Created on : Mar 8, 2010, 10:49:03 AM
Author : Jagadeesh

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<%@page import="java.util.*" %>
<%@page import="model.UserBean" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<a href="<%=request.getContextPath()%>/insertupdate.jsp">back</a>
<table width="100%"border="1">
<th>date of birth</th>
<th>phone no</th>
List list = (List)request.getAttribute("list");
for(int i=0 ; i< list.size();i++)
UserBean ubean =(UserBean) list.get(i);

<a href="ControllerServlet?action=edit&userName=<%=ubean.getUserName()%>">update</a>|
<a href="ControllerServlet?action=delete&userName=<%=ubean.getUserName()%>">delete</a></td>

now run insertupdate.jsp page and insert details then it will give following output with your database details

in next post we will update record.

Post a Comment