Ok I resolved it and I think this is the best way at least for now.
In my ActionForm, set the attribute back in request if there's error :

if(errors != null) {
ActionForm form = new ActionForm();
form.set....
form.set....
request.setAttribute("user", form);
}

Sebastian







On Mon, 2004-09-20 at 16:11, Sebastian Ho wrote:
> I thought you can't control redirect/forwrd for validation? I can
> control that for mapping forward only.
> 
> Sebastian
> 
> 
> On Mon, 2004-09-20 at 15:14, Sachin Bhutada wrote:
> > hi sebastian,
> >             If you have configured action to use redirect ( which is
> > normal case ), ur request attributes will be lost.
> > Try putting that bean seesion scope.
> > 
> > sachin 
> > xoriant, mumbai
> > 
> > PS : also make sure, how does struts take us back to input page ?( using
> > forward or redirect i guees its redirect)
> > 
> > -----Original Message-----
> > From: Sebastian Ho [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 20, 2004 12:59 PM
> > To: Struts Users Mailing List
> > Subject: bean missing after validation
> > 
> > 
> > hi
> > 
> > i have the following codes in my JSP :
> > 
> > <input type="hidden" name="userID" value="<bean:write name="user"
> > property="userID" scope="request"/>"/>
> > 
> > which converts into <input type="hidden" name="userID" value="1"/>.
> > 
> > If validation is used and there are errors, the input page is displayed.
> > Now the above value became :
> > 
> > <input type="hidden" name="userID" value=""/>
> > 
> > The valus is missing..
> > 
> > Can anyone explain why this is happening and how to resolve it?
> > 
> > sebastian 
> > 
> > 
> > ---------------------------------------------------------------------
> > 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]

Reply via email to