Thanks Steve,
You've given another good reason not to use frames!
I like your error messages! (calling user a muppet!). 
K.
PS I tried to look up your companies web site (www.Infogain.co.uk) but no such server?
(because I'm looking for struts work in the UK soon)

--- Steve Earl <[EMAIL PROTECTED]> wrote:
> Hi Keith,
> 
> Ta for the response. The reason I'm having to put the ActionErrors object
> onto the session is because the site I'm developing is using frames.
> Basically, we have an input search window and a results window below it. The
> only way I've been able to make this work is by putting the search form,
> results form (if any) and errors (again, if any) onto the session when the
> search is submitted. My action class then forwards back to the parent window
> of the two frames and the jsp for the search and results/errors drag the
> data from the session to rebuild the windows.
> 
> This was all working fine without putting errors onto the session when I
> could use the meta-equiv tag "Window-target" to target the output jsp
> (containing either errors or a set of results) to the results window.
> Unfortunately this only seems to work within Netscape and not Mozilla or
> IE....
> 
> What I've done at present is clone the html:errors tag (and associated
> class) to create an identical one which checks session scope rather than
> request scope. It's nearly working (isn't that always the way!!) -
> unfortunately I'm getting some null values coming out around the errors
> which I don't yet understand - see below:
> null
> * Please pick an arrival city you muppet
> * Please enter a fare
> * Please pick a departure city
> null
> 
> If I can sort this out (must be coming from the tag class somewhere) then I
> think that may solve my problem.
> 
> However, if anyone knows a cleaner way of doing this (without hacking the
> struts taglibs) then please let  me know!!
> 
> regards,
> steve
> 
> __________________________________ 
> Steve Earl
> 
> InfoGain Limited
> 
> 
> 
> 
> -----Original Message-----
> From: Keith Bacon [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 08, 2002 11:37 AM
> To: Struts Users Mailing List
> Subject: Re: ActionErrors
> 
> 
> Hi Steve,
> For the ActionErrors collection, get() returns an iterator which will return
> ActionError objects,
> not sure but hopefully their toString() will give the message you want. yuk!
> 
> Much better to use <html:errors> tag to display them!
> I see the 'errors' tag only gets the collection from the request.
> Hava you got a good reason for having the errors in the session? 
> Keith.
> 
> --- Steve Earl <[EMAIL PROTECTED]> wrote:
> > Hi,
> > 
> > Can anyone give me a quick tip on how to store and subsequently display an
> > ActionErrors object in session scope rather than within the request.
> > 
> > At the moment my Action class copies the ActionErrors from the request to
> > the session with:
> >             sess.setAttribute("org.apache.struts.action.ERROR",
> >     
> > request.getAttribute("org.apache.struts.action.ERROR"));
> > 
> > And I then try to access this from within my jsp with:
> >     <logic:present name="org.apache.struts.action.ERROR"
> > scope="session">
> >             <bean:write name="org.apache.struts.action.ERROR"
> > scope="session" />'
> >     </logic:present>
> > 
> > Unfortunately the output I get on the page is:
> >     org.apache.struts.action.ActionErrors@2b3d53' 
> > 
> > which seems to be the reference to the ActionErrors object rather than the
> > text of an individual error contained within it.
> > 
> > thanks in advance for any help
> > 
> > regards,
> > steve
> > 
> > 
> > __________________________________ 
> > Steve Earl
> > 
> > InfoGain Limited
> > 
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to