This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes how to set FormFile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to set FormFile" Watch "how to set FormFile" New topic
Author

how to set FormFile

Nesrin aboud
Ranch Hand

Joined: Feb 08, 2010
Posts: 48

I have a path on client side to a file,
I can not set it with String representing the path
how to set a FormFile object with this client path to be uploaded?

if it can not be done please help me by another way to upload this file
mahesh shinde
Ranch Hand

Joined: Jul 24, 2009
Posts: 69

hey buddy you need not to set any string representation .
set a bean for that tag you will get file in formfile object

it will give browse button just browse the will and press submit
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

@Mahesh: wrong version of Struts.

@Nesrin: the server (web app) cannot tell the client (browser) which file to upload. Files *must* be chosen on the client (browser) side.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to set FormFile
 
Similar Threads
How to use FormFile?
How to set file download location in struts ??
Upload file and mail it
How to convert FormFile into BLOB object?
absolute path Formfile upload