Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Copy a file from one location to another in jsp

 
Rekha Pai
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Copy a file from one location to another in jsp, also once saved make it write protected.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34686
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic