• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Vidya Moorthy
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65128
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic