This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Copy a file from one location to another in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Copy a file from one location to another in jsp" Watch "Copy a file from one location to another in jsp" New topic
Author

Copy a file from one location to another in jsp

Rekha Pai
Ranch Hand

Joined: Oct 30, 2008
Posts: 35
Copy a file from one location to another in jsp, also once saved make it write protected.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32633
    
215

Rekha,
Welcome to JavaRanch!

It would be better to do this in a Servlet. Java code should be avoided in a JSP.

Here's an example of copying a file. You can use the File class to make a file readonly or writeable only by the author.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Copy a file from one location to another in jsp
 
jQuery in Action, 3rd edition