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

How To Get a List Object with Request?

 
Brian Lan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all. I'm in trouble ,and please help me. Let me describe the situation first. When using struts and hibernate I have two JSP pages and one action one formbean related. In the first Jsp page , users can choose query constrains, and after this they click "Query" button. And then the servlet(action) will do the query job, and I put the results in a list.So the question is how can I transfer the result list object to the second Jsp page and display the results? Please help me thanks again.
[ May 02, 2007: Message edited by: Bear Bibeault ]
 
pulijala hari
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Put the List in the session or in an application scope in the servlet.
Access the same session object in the second jsp to get the list back.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are forwarding from the action to the JSP, place the list in request scope. Session scope would be overkill, and application scope would be flat-out wrong.
[ May 02, 2007: Message edited by: Bear Bibeault ]
 
Brian Lan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
Ok,I'm gonna have a try. Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!