wood burning stoves 2.0*
The moose likes JSP and the fly likes retreiving all rows from a oracle table to a jsp page and display it Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "retreiving all rows from a oracle table to a jsp page and display it" Watch "retreiving all rows from a oracle table to a jsp page and display it" New topic
Author

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

Digvijay Singhania
Greenhorn

Joined: Sep 22, 2012
Posts: 9
<%
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: 30057
    
149

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: retreiving all rows from a oracle table to a jsp page and display it
 
Similar Threads
Copy and past link problem
Displaying only part of data in JSP Page
Edit/Delete values in database using jsp
How to process operation on check box here
Struts2 variable inside javascript