Article View: borland.public.jbuilder.java.language
Article #7304Re: file access in browser - security problem
From: webseal
Date: Tue, 26 Jun 2001 12:27
Date: Tue, 26 Jun 2001 12:27
39 lines
2217 bytes
2217 bytes
Thanks for your answer On Tue, 26 Jun 2001 03:06:42 -0400, John McGrath [TeamB] <ng-b@JPMcGrath.net> wrote: >On Mon, 25 Jun 2001 21:04:05 GMT, webseal wrote: > >> in my applet I try to read some data out of an text file, >> that is stored in the same URL as the applet class on the >> server. >> >> I use the following construct to read the file > >There are two problems here. > >First, the File class is used to identify a file on a local file >system. When you run in the AppletViewer, the file is on a local >file system, so there is no problem. But that would not work over >the net. Your applet would be executing within the browser in the >client's machine, and the file would be on the HTTP server. > >Even if the file were located on the client machine, you would not >be allowed to read it from an Applet, unless you had signed the >Applet and given it permission to read the local file system. > >There are ways to get a resource from the JAR file that contains >you class files, but I understand that there are some problems >with different browsers' implementations of this. Try posting on >the "applet-issues" newsgroup -- people there will be more familiar >with the issues. > >-- >Regards, > >John McGrath [TeamB] > >--------------------------------------------------- >Before sending me e-mail, please read: > http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<3b387f88.11914436@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3b37a31f.27266020@newsgroups.borland.com> <MPG.15a1f9bdbd0dd1ea98a2e1@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,5c9fc3a5ac4eaeb1 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-26 05:38:25 PST From: webseal@web.de (webseal) Newsgroups: borland.public.jbuilder.java.language Subject: Re: file access in browser - security problem Date: Tue, 26 Jun 2001 12:27:00 GMT Message-ID: <3b387f88.11914436@newsgroups.borland.com> References: <3b37a31f.27266020@newsgroups.borland.com> <MPG.15a1f9bdbd0dd1ea98a2e1@forums.borland.com> X-Newsreader: Forte Free Agent 1.21/32.243 NNTP-Posting-Host: 217.1.21.248 X-Trace: dnews 993558420 217.1.21.248 (26 Jun 2001 05:27:00 -0700) Lines: 40 Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews