On 1/25/06, Pham Anh Tuan <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I got a problem when I submit a form with setting like below
> <form name="postEditFrm" method="POST" enctype="multipart/form-data">
>
> <input type="submit" value="add" 
> onclick='postEditFrm.action="$link.setAction("/addNewPost.do")?myNum=4";postEditFrm.submit;'>
>
> </form>
>
> I can not get the parameter name "myNum" from request.getParameter("myNum") 
> or request.getParameterMap.containsKey("myNum");
>
> I want to get the parameter here because I want to user that parameter 
> "myNum" in reset method of ActionBean.
>

Mulitpart requests are not parsed until the form population is done
(in the RequestUtils.populate() method) - so when the reset() method
is called any request parameters are not available at that point.

IMO we should separate out the Multipart handling from the form
population - I advocated a separate Command for the mutlitpart stuff
in Struts 1,3, but  at the time it looked like proposed changes to
Commons FileUpload would make that redundant. However the new
fileupload mechanisms never materialized :-(

Niall

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

Reply via email to