Re: Looking for File Upload Example

2003-06-26 Thread K.C. Baltz
If you downloaded the Struts binary distribution, try looking at the 
struts-upload webapp in the webapps/ directory of the distribution.  
Copying the .war file to your Tomcat/webapps dir should auto-deploy it 
and you should be able to direct your browser at 
http:///struts-upload  to see the example.

K.C.

Flo wrote:

Hi

i'm looking for un example of using File UPLOAD whith Struts API

The servlet and JSP code

Thanks

Flo

 



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


RE: Looking for File Upload Example

2003-06-26 Thread Bailey, Shane C.



Struts config (only because I am using a Dyna form):


 
-


In action execute method:
DynaActionForm dynaForm = (DynaActionForm)form;

FormFile fileInfo = (FormFile)dynaForm.get("fileContent");
String fileName = fileInfo.getFileName();
int fileSize = fileInfo.getFileSize ();

//This just shows it uploaded (not sure what you want to do with the file)
System.out.println("N="+fileName+" S="+fileSize);

---

In JSP:




---

That's it!




-Original Message-
From: Flo [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 26, 2003 11:31 AM
To: [EMAIL PROTECTED]
Subject: Looking for File Upload Example

Hi

i'm looking for un example of using File UPLOAD whith Struts API

The servlet and JSP code

Thanks

Flo

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