| Author |
retreiving all rows from a oracle table to a jsp page and display it
|
Digvijay Singhania
Greenhorn
Joined: Sep 22, 2012
Posts: 5
|
|
<%
ArrayList<Transaction> al=new ArrayList<Transaction>();
al=(ArrayList<Transaction>)request.getAttribute("al");
%>
<%if(al!=null)
{
%>
<table cellpadding="5" cellspacing="5" width="100%">
<tr>
<th>Date</th>
<th>Transaction Type</th>
<th>Account Number</th>
<th>Amount</th>
<th>Today Balance</th>
<th>Edit</th>
<th>Delete</th>
</tr>
<%
//int number=1;
for(Transaction bean:al)
{
%>
<tr align="center">
<td>
<%=bean.getDate() %>
</td>
<td>
<%=bean.getTransaction_Type() %>
</td>
<td>
<%=bean.getOutlet_Account_No() %>
</td>
<td>
<%= bean.getAmount() %>
</td>
<td><%= bean.getBalance() %></td>
<td><a href="/ROM/TransactionServlet?action=update&id=<%=bean.getTransaction_ID() %>">Edit</a></td>
<td><a href="/ROM/TransactionServlet?action=delete&id=<%=bean.getTransaction_ID() %>" onclick="return confirm('Are you sure you want to delete this record?')">Delete</a></td>
</tr>
<%
}
%>
</table>
<%
}
else
{
}
%>
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
|
Welcome to CodeRanch! What is the question? Does the code throw an error? Which one? Does it not compile? What is the error?
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: retreiving all rows from a oracle table to a jsp page and display it
|
|
|