• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Upload Files with MyFaces

 
Jyothi Bhogadi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
thanks Gregg for the reply.
It was of really good help and served my purpose....

thanks

jyothi.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic