File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes working with files 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 » Java » JSF
Bookmark "working with files" Watch "working with files" New topic
Author

working with files

chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 188
Hi,

In my web application I am creating a file that eventually the user will download.
This file should be stored in the memory until the user will download it.

So I am using for this task.

Is it a good approach or maybe there is a better why for creating files ?

Thanks
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

Well, tempfiles aren't usually held in memory, but if you want to create a temporary file and not care whether it's in memory or on disk, then createTempFile is a good choice.

There's nothing in JSF that is specific to temp files, but J2EE containers usually override the tempfile directory location that the JVM would be using by default. For example, on a Linux system, instead of /tmp, it would be set to TOMCAT_HOME/work, unless you overrode the override.

Customer surveys are for companies who didn't pay proper attention to begin with.
chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 188
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: working with files
 
Similar Threads
without creating ZIP file on server (hard disk) and give it to client (download)
creating/deleting folders in struts 2 dynamically
How multiple user will access a file which is being updated continuously
Download a file created on runtime
dowloading file from a server problem