Well, I'm using Struts 1.3.5 and DynaValidatorForm + validation.xml for 
validation.  We resolved the issue Friday, by performing some additional steps. 
 Instead of using DynaValidatorForm, we created our own class which extends 
DynaValidatorForm.  After we call the validate-method, and it fails, we add a 
new object to the request of the page.  It seems that, after you call 
"validate", a new request for the page is being sent, so if you don't add a new 
object to it, it "forgets" all those values.

If there are other solutions, please, feel free to share them.

Kind regards

Bjorn De Bakker

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: zondag 28 januari 2007 0:26
To: user@struts.apache.org
Subject: Re: Loss of request attributes after validation form

[EMAIL PROTECTED] wrote:
> Ok, I resolved the previous error, but now a new one pops up.
> 
> This is the situation:
> We have a database in which we can look up certain persons.  When we find a 
> person, we have the ability to register him in another database, with 
> additional values.
> If you find a user, you have a button to register him in the other database.  
> If you push that button, an object is put in the request in the following 
> action (req.setAttribute("currentUser", currentUser)).  The next screen shows 
> a form, with a few values already there, retrieved from the request (<c:out 
> value=${currentUser.firstName} />) and some textfields to supply additional 
> values (e.g. e-mail).  Now, when I push register, the validation is triggered 
> and when it fails, you return to this screen.  The problem is that the 
> request is cleared, right before that, so c:out shows nothing.  
> 
> Is there a way to solve this problem?  Or a workaround?

What version of Struts are you using? How are you handling validation? 
We will need more details about your setup and configuration to diagnose 
this. It sounds like you're doing a redirect after validation, otherwise 
the request shouldn't get cleared.

L.


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



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.

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

Reply via email to