wood burning stoves 2.0*
The moose likes Struts and the fly likes get Collection from request scope ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "get Collection from request scope ???" Watch "get Collection from request scope ???" New topic
Author

get Collection from request scope ???

Deependra Tewari
Greenhorn

Joined: Apr 12, 2006
Posts: 13
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

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
Deependra Tewari
Greenhorn

Joined: Apr 12, 2006
Posts: 13
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

Joined: May 24, 2003
Posts: 425
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

Joined: Apr 12, 2006
Posts: 13
thanks its working now.

sorry for not being alert .....
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: get Collection from request scope ???