Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

retreiving all rows from a oracle table to a jsp page and display it

 
Digvijay Singhania
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%
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
author & internet detective
Sheriff
Posts: 35762
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch! What is the question? Does the code throw an error? Which one? Does it not compile? What is the error?
 
mooooooo ..... tiny ad ....
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!