A Techno Blog, mainly about Java

Request object in Struts when validation fails

I ran into a problem within struts where my validation fails on the form data that is submitted
from my jsp, and when control is returned back to the jsp as specified in the struts config file,
i lose my request data. In my case it was a string value that is populated in a
servlet using the request object prior to forwarding to the jsp the first time.  Seems this is a common
thing with struts as the issue is also described here

The way i got around it was to set the string value in a session object prior to submitting the data. Then, if the jsp form validation fails, and
the jsp is reinvoked where the request object is null, I can get the string value from the session object.

November 10, 2004 - Posted by | Struts

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: