This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell 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


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: 30596
    
154

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
GeeCON Prague 2014
 
subject: Copy a file from one location to another in jsp