🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7389

file access in browser - security problem

#7389
From: webseal
Date: Mon, 25 Jun 2001 21:04
28 lines
1481 bytes
Hi,
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

stdFile = new File("file.txt");        
try
{
     fileIn = new BufferedReader(new FileReader(stdFile));
}
catch (IOException e)
{
    System.out.println("...");
}

If I start the applet within jbuilder in the appletviewer, everything
works fine.
But if I start the html-file, that starts the applet in browser I get
an error in the browser:
com.ms.securitiy.SecurityExceptionEx(..) cannot access file file.txt

I think there is a security problem when connecting to the file.
Should I use another read-method, instead of bufferedreader(new
filereader ...)?
Help appreciated

Webseal
Technical Details
Message-ID: <3b37a31f.27266020@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!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,5c9fc3a5ac4eaeb1,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-25 14:08:30 PST
From: webseal@web.de (webseal)
Newsgroups: borland.public.jbuilder.java.language
Subject: file access in browser - security problem
Date: Mon, 25 Jun 2001 21:04:05 GMT
Message-ID: <3b37a31f.27266020@newsgroups.borland.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: 62.224.168.140
X-Trace: dnews 993503047 62.224.168.140 (25 Jun 2001 14:04:07 -0700)
Lines: 28
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