• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Restricting access via url to (video files)folder in application folder present in tomcat webapps

 
kranthi chamarthi
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am developing an online video sharing site. I am using tomcat 5.5.17 for my project. I am having my application folder in webapps of tomcat. In my application folder there is another folder where i have my .flv video files. Now, user can watch the video by accessing videodisplay.jsp where i have a open source flv player embedded. I will supply the url of the video file to the player in that page. Problem is if the user right clicks and views the source of videodisplay.jsp, he can get the url of my video file. He can simply copy paste the url and download the file. Is there a way to prevent this from happening???. My tomcat is present on a windows 2003 server machine.
Thanks
Kranthi
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way would be to store your video files in the Amazon cloud and have your app serve a page with a URL having a restricted lifespan. Here is my example page.

This would have the advantage of unloading a huge bandwidth hog from your server. But in any case, once you have handed out a video stream you have no control over what the user does with it.

Bill
 
kranthi chamarthi
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the suggestion, but can't we do this without using amazon s3.
I was googling about this and found that saving the video files as blob in database may solve the problem. How far this is a feasible solution?
Thanks
Kranthi
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont see what you gain from a blob.

Basically you want your video file to NOT be accessible with a normal URL. This can just be a directory that the server cant address directly. Therefore you will have to write a servlet which will get the request, figure out where the file is, and start streaming it to the response.

A google search for "java streaming video" finds lots of interesting options.

Bill

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic