Upon failure of validation, the framework will attempt to *forward* to the location 
indicated by the input attribute of the action mapping.  That is why you are able to 
surface the (erroneous) value(s) that the user may have entered.

Sri

-----Original Message-----
From: Randy Germany [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 16, 2002 11:57 AM
To: Struts Users Mailing List
Subject: Re: Lifecycle of a request object


I miscommunicated what I was trying to say. The request object isn't null, but an 
attribute in the request object doesn't look like it's ever set.  This is a bean 
attribute inside the request object.  I guess the real question I need answered is, 
when a form fails validation, is a new request object being created and sent to the 
original jsp?

[EMAIL PROTECTED] wrote:
> 
> >>Cannot find bean null in request scope
> Where do u get this message?Do u mean when the validation fails u get 
> this message after forwarding to the jsp?
> >> In using System.out.printlns() to debug the application, the 
> >> validate
> receives
> >>the ActionMapping object and HttpServletRequest objects as 
> >>arguments. If I do a printout of the one of the request attributes 
> >>in this method, the request is already null coming to the method.
> I think there is some minunderstaing..The request object can never be 
> null.Do U mean to say the attribute is not there?And BTW, U should be 
> looking for the parameter and not attribut if u are checking for the 
> presence of some values being passed form a jsp....Unless ua re 
> explicitely doing some thing like
> request.setAttribute() in the jsp...
> 
> -----Original Message-----
> From: jrgermany [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 16, 2002 5:17 PM
> To: struts-user
> Cc: jrgermany
> Subject: Re: Lifecycle of a request object
> 
> Thanks for the response.  What I'm trying to do is validate the page 
> using the struts validate method which I have overridden. In using
> System.out.printlns() to debug the application, the validate receives 
> the ActionMapping object and HttpServletRequest objects as arguments. 
> If I do a printout of the one of the request attributes in this 
> method, the request is already null coming to the method.  Thus, I get 
> a "Cannot find bean null in request scope" in my logs.  So I was 
> wondering at what point is the request object losing scope after going 
> from the .jsp page to the form's validate method.
> 
> Thanks,
> Randy
> 
> [EMAIL PROTECTED] wrote:
> >
> > Hi,
> > Struts uses HTTpRequest object as it is.So it behaves exactly the 
> > same like a httpRequest(VAlid for one http transaction...Available 
> > form the time the
> client
> > sends a request to the server till the response is commited).Also it 
> > will be available if u do any forwards etc.
> >
> > What is it exactly u want to know?
> >
> > -----Original Message-----
> > From: jrgermany [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, December 16, 2002 4:28 PM
> > To: struts-user
> > Cc: jrgermany
> > Subject: Lifecycle of a request object
> >
> > Can someone tell me where to find documentation on the lifecycle of 
> > a request object within the struts framework?  I've been looking 
> > through the documentation but haven't come across this reading as of 
> > yet.
> >
> > --
> > 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]>
> 
> --
> 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]>

Reply via email to