dcsimg
Cannot find bean XXX in any scope... WHAT THE...???
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   John_Frink
Posted On:   Tuesday, March 9, 2004 05:03 PM

I have this stupid problem for a second day and by now i'm ready to give up on struts. And it's not like it's some tricky thing, it is something that any stupid tutorial gives as an example. In my action i create a Collection of beans and store it in request trying to pass it to some JSP that uses to format that collection as a table. So in my action i have: request.setAttribute("XXX", mycollection); return mapping.findForward("myview"); and in my jsp i have something like: ... And when i try to run it says: Cannot find bean XXX in any scope... Oh yeah? And where the hell did it    More>>

I have this stupid problem for a second day and by now i'm ready to give up on struts. And it's not like it's some tricky thing, it is something that any stupid tutorial gives as an example.



In my action i create a Collection of beans and store it in request trying to pass it to some JSP that uses to format that collection as a table.



So in my action i have:



			
request.setAttribute("XXX", mycollection);

return mapping.findForward("myview");


and in my jsp i have something like:



			



...



And when i try to run it says:



Cannot find bean XXX in any scope...



Oh yeah? And where the hell did it go???



And it's not that i'm crazy or something - collection is a valid object (Vector), and everything else seems to be correct BECAUSE when i store that collection in my session object instead, everything works.



I've seen many people ask the same question on different boards and not a single time i've seen a meaningful answer.

   <<Less

Re: Cannot find bean XXX in any scope... WHAT THE...???

Posted By:   Chris_Vilsack  
Posted On:   Tuesday, April 27, 2004 09:00 AM

getting that same problem.. did you ever find a solution? cvilsack@btmna.com

Re: Cannot find bean XXX in any scope... WHAT THE...???

Posted By:   John_Frink  
Posted On:   Tuesday, March 9, 2004 05:45 PM

I think i found what the problem was. With all this copying and pasting i ended up having redirect="true" in my action definition. So as far as i understand whatever i was storing in my request was lost during this redirection.
About | Sitemap | Contact