This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths 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 Head First Android this week in the Android 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: 32302
    
213

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]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Copy a file from one location to another in jsp
 
It's not a secret anymore!