Have something print out all of the request scope attributes and see what's there. I've attached a bit of jsp which I use to diagnose this sort of issue. Alternatively set a breakpoint in your code after setting the attribute and have a look in the debugger.
<bean:page id="this_request" property="request" /> <% java.util.Enumeration e2 = this_request.getAttributeNames(); while (e2.hasMoreElements()) { String element = (String)e2.nextElement(); out.write("<br>" + element + " : " + this_request.getAttribute(element).getClass().getName()); out.write("<br><br>" + this_request.getAttribute(element).toString() + "<br>"); } %> Paul > -----Original Message----- > From: Honza Spurný [mailto:[EMAIL PROTECTED] > Sent: 28 November 2003 11:59 > To: Struts Users Mailing List > Subject: Re: request.setAttribute > > > Paul McCulloch wrote: > > It still isn't correct. You staore it as "myObejct" and try and > > retrieve it > > as "myObject" > > OK OK, that is only overwrite, sorry... but this is not > copied from code, > this is written to make easy view of the problem... In code I > have correct > values, realy. > > so: > MyObject o = new MyObject(); > o.setObjectName("name"); > request.setAttribute("myObject", o); > > MyObject o2 = (MyObject)request.getAttribute("myObject"); > > if (o2 == null) System.out.println("NULL"); > else System.out.println(o.getObjectName()); > > > > > > > Paul > > > >> -----Original Message----- > >> From: Honza Spurný [mailto:[EMAIL PROTECTED] > >> Sent: 28 November 2003 11:51 > >> To: Struts Users Mailing List; Honza Spurný > >> Subject: Re: request.setAttribute > >> > >> > >> Corrected version: > >> > >> MyObject o = new MyObject(); > >> o.setObjectName("name"); > >> request.setAttribute("myObejct", o); > >> > >> MyObject o2 = (MyObject)request.getAttribute("myObject"); > >> > >> if (o2 == null) System.out.println("NULL"); > >> else System.out.println(o.getObjectName()); > >> > >> > >> The problem still occures. I'm not able to download from > request such > >> MyObject as I have stored in. Can it be caused by the huge > >> size of object? > >> > >> Sporak > >> > >> > >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: > [EMAIL PROTECTED] > >> > > > > > > ************************************** > > Axios Email Confidentiality Footer > > Privileged/Confidential Information may be contained in > this message. > > If you are not the addressee indicated in this message (or > > responsible for delivery of the message to such person), you may not > > copy or deliver this message to anyone. In such case, you should > > destroy this message, and notify us immediately. If you or your > > employer does not consent to Internet email messages of this kind, > > please advise us immediately. Opinions, conclusions and other > > information expressed in this message are not given or > endorsed by my > > Company or employer unless otherwise indicated by an authorised > > representative independent of this message. > > WARNING: > > While Axios Systems Ltd takes steps to prevent computer viruses from > > being transmitted via electronic mail attachments we cannot > guarantee > > that attachments do not contain computer virus code. You are > > therefore strongly advised to undertake anti virus checks prior to > > accessing the attachment to this electronic mail. Axios Systems Ltd > > grants no warranties regarding performance use or quality of any > > attachment and undertakes no liability for loss or damage howsoever > > caused. > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]