aspose file tools*
The moose likes JSF and the fly likes how to copy an uploaded files from jboss 7.1.1 temporary folder to another folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "how to copy an uploaded files from jboss 7.1.1 temporary folder to another folder" Watch "how to copy an uploaded files from jboss 7.1.1 temporary folder to another folder" New topic
Author

how to copy an uploaded files from jboss 7.1.1 temporary folder to another folder

fahad nizamani
Greenhorn

Joined: Nov 19, 2011
Posts: 7
I am using richfaces 4 with jsf2.0 and Jboss7.1.1 to upload a file, its working well and files are being uploaded.
How can i know the path of the temporary directory where the uploaded files are stored.
and can any one guide me how can i copy these uploaded files from the jboss temporary folder to another folder.
thanks.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

Actually, depending on the server and framework, an uploaded file may or may not actually live in a folder, since what you really upload isn't the file, it's the data in the file and in the case of small files, the server may just keep the data in RAM.

As a result, the file upload APIs usually give you a mechanism to access the data as an input stream. If you want to store the data in a permanent file, you would construct an output File and copy the inputstream's contents to that File.

Please note that the permanent file should NOT be located within the webapp itself or within the JBoss server directories. Use an external directory. Failure to do so can have unfortunate consequences at unfortunate times.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to copy an uploaded files from jboss 7.1.1 temporary folder to another folder