commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Cook <bc...@printtime.com>
Subject Re: [Fwd: Re: [FileUpload] Issue with multipart/form-data and request parameters in include]
Date Thu, 01 Sep 2005 19:26:54 GMT

Nothing has changed that I can see here.  The situation remains that you 
need to have the parameters passed as hidden fields.  This will be true 
of any file upload option.

It also looks like you need standardize your development practices.  Why 
are you supporting 3 or more http POST/Get options?  You will help your 
self in the long run if you simplify this and use just one or two. Also 
page fragments usually are not used as dynamic parts of forms unless 
they are all standardized.  Or if they are they use simple options.

Last point you want to have all replys to the tread go to the list not 
the individual person responding.


Andreas Schildbach wrote:
> Hallo Brian,
> 
> did you see my post from Sunday on commons-user@jakarta.apache.org? May 
> I politely ask if you know an answer? Sorry for emailing you directly, 
> but maybe you just overlooked my clarification.
> 
> Regards,
> 
> Andreas
> 
> -------- Original Message --------
> Subject: Re: [FileUpload] Issue with multipart/form-data and request 
> parameters     in include
> Date: Sun, 28 Aug 2005 11:34:19 +0200
> From: Andreas Schildbach <andreas@schildbach.de>
> Reply-To: Jakarta Commons Users List <commons-user@jakarta.apache.org>
> Newsgroups: gmane.comp.jakarta.commons.user
> References: <dennni$opk$1@sea.gmane.org> 
> <430F6D34.3040402@printtime.com> <dep0se$ij3$1@sea.gmane.org> 
> <431081D4.7040203@printtime.com>
> 
> Hello Brian,
> 
> I am sorry my last answer was a bit sloppy. For the sake of simplicity,
> please consider the following JSP 2.0 fragment:
> 
> --- fragment.jsp ---
> ${param.p}
> --- end fragment.jsp ---
> 
> This obviously outputs the parameter named p. Of course, my real
> fragment is much more complex than that, using an own controller and
> such (I was also using the words "plugin" and "portlet" because
> web-designers often use these. I was not talking about applets or
> embedded objects).
> 
> Ok, now here is a JSP which is the target of a form (I am skipping
> taglib defs):
> 
> --- target.jsp ---
> <c:import url="fragment.jsp?p=value1"/>
> hello world
> <c:import url="fragment.jsp?p=value2"/>
> --- end target.jsp ---
> 
> --- form.jsp ---
> <form action="target.jsp" method="post" enctype="multipart/form-data">
>   [skipping form fields]
> </form>
> --- end form.jsp ---
> 
> (and yes, I did get jsp:include and c:import mixed up in my last post)
> 
> Now, here is what happens with the different methods for posting the form:
> 
> 1. GET: "value1 hello world value2"
> 2. POST (default enctype): "value1 hello world value2"
> 3. POST enctype="multipart/form-data": "hello world"
> 
> As I wrote, I am wondering why 2 works but I am very happy about it. It
> would be great if 3 worked as 2.
> 
> I wonder what would be a reliable way to add parameters to included
> resources, that works regardless of the type of initial request.
> 
> I am using FileUpload in a Spring (springframework.org) context, in a
> way that can be compared to a Servlet filter:
> 
> <bean id="multipartResolver"
> class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/> 
> 
> 
> I hope I left no questions open this time. Sorry for that last
> inaccurate post.
> 
> Regards,
> 
> Andreas
> 


Mime
View raw message