Reading files in an applet
I am making a very simple applet that reads a file and displays it to the user. The files are located on the web server, not the user's machine. The applet works wonderfully when I use sun's applet viewer, but doesn't when I load it in a browser, instead I get a security error. Is there a simple way to read the file without creating a servlet?
Applet & Resouces
You say: The files are located on the web server.
That sounds good. How does the applet load the files?
Should get them from the server (best to use http), and load then from the client.
Ok, I fixed my problem. I used a URL, and it works now. I actually tried that before posting this here, but it didn't work. The problem was I tried to access the files on my webserver when I was running the applet from my hard drive. Once I changed the path in the URL to "file:C:\path of file" it worked great. Then I just change it to the http reference before I upload it to the webserver and it works great.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center