wood burning stoves 2.0*
The moose likes JSP and the fly likes Trying to access an arraylist or a cart object from a jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Trying to access an arraylist or a cart object from a jsp page" Watch "Trying to access an arraylist or a cart object from a jsp page" New topic
Author

Trying to access an arraylist or a cart object from a jsp page

Vidya Moorthy
Ranch Hand

Joined: Nov 13, 2003
Posts: 57
Hi all
I am trying to learn the shopping cart tutorial from Murach's servlets and jsp book. I am trying to integrate MQ series with that. In this project, some products are stored in a database and every time the user clicks on some product page, it should not make a database call. The database records are fetched in a Message Driven bean and stored as an arraylist or cart object. How do I call that arraylist or cart object from a jsp page?Please help me!
Thanks in advance
Vidya
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Your page controller servlet (which I assume obtains the arraylist of information from a model class) will place the list into request scope via request.setAttribute(). Then in the JSP, you will ise the EL and JSTL to access the information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Trying to access an arraylist or a cart object from a jsp page
 
Similar Threads
jsp session scope List values
Shopping cart application using struts
Checking the size of an ArrayList in a JSP page
How to transfer Objects from JSP to a Servlet?
Advice on persisting complex state across multiple server trips