You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by rmanchu <rm...@gmail.com> on 2005/04/29 00:25:39 UTC

multipart-formdata

hi guys,

long day today so am not thinking clearly :(

if a multipart-formdata form was submitted, would a 
request.getParameter("paramname") return the correct values in an Action?

the wrapper takes care of this right?

)|(

riyaz

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: multipart-formdata

Posted by Dakota Jack <da...@gmail.com>.
I am not sure what you are planning to do, so it is a bit hard to be
helpful.  It does not matter if there are file uploads on the form. 
If the RequestProcessor detects that it is a multipart request and you
have associated an ActionForm with your Action, Struts will grab the
multipart request and parse it as coded in the Struts upload
application.  This is, I think, unfortunate, but others are okay with
it.  What I do is just not use the ActionForm.

The reason for the difference with multipart requests is that there is
a wrapper for the request created in the request processing.  The code
is relatively simple.

Jack

On 4/28/05, rmanchu <rm...@gmail.com> wrote:
> Dakota Jack wrote:
> 
> > you cannot use the ActionForm.  From your question I assume you are
> > using the ActionForm and wondering what in the heck happened to your
> > multipart request?
> 
> no. i just wanted to know if i do request.getParameter("paramname")
> within an Action for an ActionForm submitted as multipart-formdata would
> i get the same result as for a normally submitted ActionForm? there are
> no file uploads on the form
> 
> riyaz
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: multipart-formdata

Posted by rmanchu <rm...@gmail.com>.
Dakota Jack wrote:

> you cannot use the ActionForm.  From your question I assume you are
> using the ActionForm and wondering what in the heck happened to your
> multipart request?

no. i just wanted to know if i do request.getParameter("paramname") 
within an Action for an ActionForm submitted as multipart-formdata would 
i get the same result as for a normally submitted ActionForm? there are 
no file uploads on the form

riyaz

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: multipart-formdata

Posted by Dakota Jack <da...@gmail.com>.
This is a more important question than you might realize and the
answer is not obvious.  When you have a multipart request in Struts,
what happens depends upon whether or not you have an ActionForm
associated with your Action.  If you do, then the Struts application
grabs the multipart request and services the upload application which
is not ony packaged in the Struts framework but also given a
proprietary access to the multipart data.  If you want to have access
to the request, outside the upload application that comes with Struts,
you cannot use the ActionForm.  From your question I assume you are
using the ActionForm and wondering what in the heck happened to your
multipart request?

Jack

On 4/28/05, rmanchu <rm...@gmail.com> wrote:
> 
> hi guys,
> 
> long day today so am not thinking clearly :(
> 
> if a multipart-formdata form was submitted, would a
> request.getParameter("paramname") return the correct values in an Action?
> 
> the wrapper takes care of this right?
> 
> )|(
> 
> riyaz
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


AW: multipart-formdata

Posted by Leon Rosenberg <st...@anotheria.net>.
Yes.

Normally, you don't have to distinguish between POST and GET.

leon

> -----Ursprüngliche Nachricht-----
> Von: rmanchu [mailto:rmanchu@gmail.com] 
> Gesendet: Freitag, 29. April 2005 00:26
> An: Struts Users Mailing List
> Betreff: multipart-formdata
> 
> 
> hi guys,
> 
> long day today so am not thinking clearly :(
> 
> if a multipart-formdata form was submitted, would a
> request.getParameter("paramname") return the correct values 
> in an Action?
> 
> the wrapper takes care of this right?
> 
> )|(
> 
> riyaz
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org