Hello,

I have a problem using the current validate scheme. 

Scenario:
I have a Struts action that adds a bean B in the request, also populates a
form bean. Next, the Struts controller forwards the request to a jsp page P.
Then the next request is made, but the validate method on the form bean
failes, and the Struts controller forwards the request again the jsp page P.
However, bean B is now missing in the request. How to solve this problem?

I can think of two solutions:
1. Add bean B in session scope. I do not like adding beans in session scope
which have no functional meaning
2. If validate fails, forward to a special action that adds bean B in the
request, but that does not populate the form bean. I do not like this as
well, as the new action is only needed to deal with validation.

Any ideas?

Thanks, Arjan Kok.

Reply via email to