File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes File Creation using IO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "File Creation using IO" Watch "File Creation using IO" New topic
Author

File Creation using IO

Priyaa Vijay
Greenhorn

Joined: Mar 10, 2005
Posts: 9
Hi,

I have an application where user enters a directory and file name in a Textfield and I go ahead and create a file in that specified directory.

For ex. if user entered c:\temp\Testfile.xls, I create that file in C:\temp.

this is working fine when I run the server(Tomcat) locally on my machine. I deployed this code on unix and when I accessed the application to create a file, I saw that it was created on the unix box.

But I want the file to be created on user's local machine in the specified directory. How do I achieve this?


Thanks,<br />Priya
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

Obviously, the code that creates the file has to be running on the client's machine, not on the server. That code could be a digitally-signed applet, a Java Web Start application, or even a standalone Java application.

Alternatively, you could just have the web application serve the file, and let the user save it using "save as..." in their browser.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Creation using IO
 
Similar Threads
Dumbest question in the world... URLs, EMBED, and portlets
File API createTempFile(..) method
Problem in copying file from server to client local machine folder
Download pdf file in struts2
Picked up _JAVA_OPTIONS