Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

get Collection from request scope ???

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks its working now.

sorry for not being alert .....
 
Evil is afoot. But this tiny ad is just an ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic