• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get Collection from request scope ???

 
Deependra Tewari
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I'm trying to get an ArrayList back on a jsp page that i had previously added to the request object using request.setAttribute("name",listObject);

I had added it in the execute method of Action class that will forward to this jsp page where i want to get back this ArrayList and show its details !!!

However the page comes out to be blank. not even the table headings are visible !!! the struts-config.xml,web.xml, and context.xml are all ok !!!

Thanks
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to help you find the problem, we'll need you to post:

1-The portion of your Action class that sets the value in the request
2-The portion of your JSP that tries to retrieve and display the value from the request.
3-Any entries in your struts-config.xml file that are relevant to this process.
 
Deependra Tewari
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the action class
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
Here's the jsp that displays the ArrayList
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
struts-config.xml entry relevant to this page
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
Thanks

Added [ c o d e ] [ / c o d e ] tags to make this readable - Merrill
[ July 31, 2006: Message edited by: Merrill Higginson ]
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you receive a blank page in struts it's because of forward issue. Your action class contains

return mapping.findForward("showList"); //forwards ok to the display page !!!


and the forward is configured as

<forward name="showlist" path="/showList.jsp" />
 
Deependra Tewari
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks its working now.

sorry for not being alert .....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic