Article View: borland.public.jbuilder.java.language
Article #7311Re: file access in browser - security problem
From: Mark Griffiths
Date: Tue, 26 Jun 2001 14:35
Date: Tue, 26 Jun 2001 14:35
19 lines
1532 bytes
1532 bytes
"webseal" <webseal@web.de> 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.
If the text file is stored on the same webserver as the applet, then have
you tried:
URL url = new URL(getDocumentBase(), "datafile.dat");
InputStream x = url.openStream();
This code is from a small applet I wrote once that read it's data from a
file on the web server. I do not remember coming accross any security
implications. I don't think an applet is restricted from communicating with
the server from which it was served.
I can send you the entire applet if it helps.
--
Mark
Technical Details
Message-ID:
<3b389da6_2@dnews>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>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 07:40:33 PST From: "Mark Griffiths" <mark@chive.com> Newsgroups: borland.public.jbuilder.java.language References: <3b37a31f.27266020@newsgroups.borland.com> Subject: Re: file access in browser - security problem Date: Tue, 26 Jun 2001 15:35:24 +0100 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 213.122.33.72 Message-ID: <3b389da6_2@dnews> X-Trace: dnews 993566118 213.122.33.72 (26 Jun 2001 07:35:18 -0700) 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