aspose file tools*
The moose likes JSF and the fly likes Upload Files with  MyFaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Upload Files with  MyFaces" Watch "Upload Files with  MyFaces" New topic
Author

Upload Files with MyFaces

Jyothi Bhogadi
Ranch Hand

Joined: Jul 08, 2005
Posts: 47
hi ,
i am trying to do a file upload with the help of myfaces component given for same.
but i have a problem with the location of the storage of the file that is being uploaded .... i am able to upload my file successfully..... but i want to have my uploaded files placed in the location which is specified by me.
can anyone please help me with the code as to how to do this.....using myfaces upload component......
Any immediate help would be really appreciated as it is a kind of urgent...

Thanks in advance
jyo.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

There is nothing in MyFaces I know that allows you to specify this. They only specify the intermediate location in the web.xml file. Though, you can basically do the same thing. You could use a context-param and initialize a path location from there and access it via the FacesContext or you could just have a String constant that defines this location in your java code or any other config file or means.


GenRocket - Experts at Building Test Data
Daniel Prene
Ranch Hand

Joined: Jul 15, 2005
Posts: 241
There's a reason why myFaces is open source... take advantage of it... (with compliance of the license of course)

Check out:
http://myfaces.apache.org/source.cgi
Jyothi Bhogadi
Ranch Hand

Joined: Jul 08, 2005
Posts: 47
hi,
thanks Gregg for the reply.
It was of really good help and served my purpose....

thanks

jyothi.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Upload Files with MyFaces