Is there a reason I am losing my request parameters when returning
validation errors to a multipart form page?

 

I have a simple struts form. It has a few text fields and a file field. The
enctype is multipart/form-data on my form. I validate in the actionform's
validate method.  If the text fields are empty, I return errors that they
are required. Along with the visible fields, I pass a few hidden fields that
are needed as request params when the form is processed and returned to the
jsp. The jsp needs these request params. 

 

Everything works great when there are no validation errors as the request
params get returned by using the ActionRedirect class in the action. But if
there are errors returned, I lose the request params. (I am able to access
them in the actionform validate method or in the action). 

 

If I perform a test of 2 identical forms with a few required text fields,
one multipart one url-encoded, the url-encoded form maintains the request
params when validation errors are returned and the multipart form does not. 

 

What am I doing wrong? How can I make sure the request params are passed
back upon validation error in multipart form?

 

Thanks!

Reply via email to