tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <>
Subject Re: Access Local File System
Date Sun, 06 Jul 2008 03:35:13 GMT

----- Original Message ----- 
From: "bperquku" <>
To: <>
Sent: Saturday, July 05, 2008 11:13 PM
Subject: Access Local File System

> I have written i simple web application using Eclipse and Tomcat 6. I'm
> trying to stream a flv video in jsp page. It works good if flv file is
> located under webroot, but when i change location ex. c:/ the file is not
> loaded. I'm using jw player so i opened a question in that forum, and i
> received an answer that there is no way to access local filesystem from
> tomcat ( . here is my sample
> code:
> <div id="container">
> Get the Flash Player to see this video.</div>
> <script type="text/javascript" src="swfobject.js"></script>
> <script type="text/javascript">
> var s1 = new SWFObject("mediaplayer.swf","mediaplayer","500","450","8");
> s1.addParam("allowfullscreen","true");
> s1.addVariable("width","500");
> s1.addVariable("height","450");
> s1.addVariable('file', 'file:///C:/video/star.flv');
> s1.write("container");
> </script>
> Im trying to load a file that is located into c:/video
> Any idea,
> Thanks in advance
> -- 

Well, I think this is enuf to confuse anyone ;)
You see the script runs in the browser... so this 
('file:///C:/video/star.flv') looks like you trying to access a file on the 
local system... "on the users machine"... if so you outta luck because a 
browser gets unhappy when the page comes from a server and tries to access 
the local file system... its a security thing...
But I imagine that when it works you using something like (star.flv) which 
probably means
http://thedomain/webapp/star.flv.... and its coming from the server.... but 
you want it out side of Tomcat...

Google for Context and DocBase.... you'll figure out how to make tomcat see 
a file outside of the normal structure.... it allows you to put the webapp 
anywhere on the machine....

Good Luck ;)

The most powerful application server on earth.
The only real POJO Application Server.
See it in Action :

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message