Hi All....
I have a simple application and problem with it.
Once user logged in to system the user will redirect to LoginServlet.java controller.
Then in LoginServlet I want to redirect user to another page called book_details.jsp.
this is my login servlet.
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
PrintWriter out = response.getWriter();
ArrayList<BankAccountDTO> account_list = new ArrayList();
ResultSet resultSet = null;
LowFairAirDB airDB = null;
try{
airDB = new LowFairAirDB();
String query = "SELECT account_id, type, description, balance, credit_line, begin_balance, begin_balance_time_stamp FROM bank_account";
airDB.sqlSelect(query);
resultSet = airDB.getResultSet();
while(resultSet.next()){
account_list.add(new BankAccountDTO(resultSet.getInt(1),
resultSet.getInt(4),
resultSet.getInt(5),
resultSet.getInt(6),
resultSet.getString(2),
resultSet.getString(3),
resultSet.getString(7)));
}
}catch(Exception ex){
}finally{
try{resultSet.close();}catch(Exception ex){}
airDB.sqlClose();
}
}
I set bank account values to BankAccountDTO.java objects and add them to the arrayList.
Next I want to send this objects arrayList to books_details.jsp and wanna display each objects values using JSTL.
I still finding a way to go through this.
1. Can anyone say how can I do it?
2. Is there any other method to do the same thing without using JSTL?
thanks in advance,
Dil.