You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kailash Vasani <Ka...@quinnox.com> on 2004/09/09 13:31:06 UTC

RE: J2EE application - Upload one or more files on client to serv er

Hi,

In case u r using Struts

1) In HTML / JSP page use <INPUT type="file" .../>, this field is where user
would be 
   interacting and setting file path. The form containing this button, must
have encoding type
   set to multipart/form-data i.e. enctype="multipart/form-data"
2) Create an action class that gets invoked then user clicks submit button
3) Use Apache Commons File upload APIs to retrieve form data as well as
uploaded file.

In case u r not using Struts & using Servlet, then step 2 above changes to
Creation of Servlet,
that would do the same.

Thanks & Regards,
Kailash

-----Original Message-----
From: Dao Xuan Nam [mailto:namdx@luvina.net]
Sent: Thursday, September 09, 2004 4:36 PM
To: scea_j2ee@yahoogroups.com
Cc: j2eelist@yahoogroups.com; j2ee-opensource@yahoogroups.com;
j2eerocks@yahoogroups.com; J2EEWorld@yahoogroups.com;
vanjug@openroad.ca; scea_j2ee@yahoogroups.com; user@struts.apache.org
Subject: J2EE application - Upload one or more files on client to server


Hi all,

In our application, I have to implement a function to upload one or more
files on client's machine to server? But i do not know how to
implement it using J2EE technologies such as JSP, Servelet?

Thank you very much

Nam


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Global Leadership in eBusiness and IT services, vertically aligned for
clients in the automotive/discrete manufacturing, SAP,ERP and powered by an
offshore-based global delivery model.

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


Re: J2EE application - Upload one or more files on client to server

Posted by Dao Xuan Nam <na...@luvina.net>.
Hi Kailash:

Thank you very much for your suggestion.
I am sure do upload one file to server but are you sure when end user want
upload more files to server at the same time?

Thank you very much for your help,

Nam

----- Original Message -----
From: "Kailash Vasani" <Ka...@quinnox.com>
To: "'Struts Users Mailing List'" <us...@struts.apache.org>
Sent: Thursday, September 09, 2004 6:31 PM
Subject: RE: J2EE application - Upload one or more files on client to server


> Hi,
>
> In case u r using Struts
>
> 1) In HTML / JSP page use <INPUT type="file" .../>, this field is where
user
> would be
>    interacting and setting file path. The form containing this button,
must
> have encoding type
>    set to multipart/form-data i.e. enctype="multipart/form-data"
> 2) Create an action class that gets invoked then user clicks submit button
> 3) Use Apache Commons File upload APIs to retrieve form data as well as
> uploaded file.
>
> In case u r not using Struts & using Servlet, then step 2 above changes to
> Creation of Servlet,
> that would do the same.
>
> Thanks & Regards,
> Kailash
>
> -----Original Message-----
> From: Dao Xuan Nam [mailto:namdx@luvina.net]
> Sent: Thursday, September 09, 2004 4:36 PM
> To: scea_j2ee@yahoogroups.com
> Cc: j2eelist@yahoogroups.com; j2ee-opensource@yahoogroups.com;
> j2eerocks@yahoogroups.com; J2EEWorld@yahoogroups.com;
> vanjug@openroad.ca; scea_j2ee@yahoogroups.com; user@struts.apache.org
> Subject: J2EE application - Upload one or more files on client to server
>
>
> Hi all,
>
> In our application, I have to implement a function to upload one or more
> files on client's machine to server? But i do not know how to
> implement it using J2EE technologies such as JSP, Servelet?
>
> Thank you very much
>
> Nam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> Global Leadership in eBusiness and IT services, vertically aligned for
> clients in the automotive/discrete manufacturing, SAP,ERP and powered by
an
> offshore-based global delivery model.
>
> ---------------------------------------------------------------------
> 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