It's not a secret anymore!
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to set FormFile" Watch "how to set FormFile" New topic

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

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.
subject: how to set FormFile
It's not a secret anymore!