This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Applets and the fly likes Applet to read text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet to read text" Watch "Applet to read text" New topic
Author

Applet to read text

Bahadir Mert Uzan
Greenhorn

Joined: Mar 27, 2009
Posts: 13
Hi there Java Gurus

I am bombing you with questions but I need help

I read a text file using a class called scanner and then build objects using the information(Text is in the same folder with class files)
Then I build a various list to send it into my JPanel.
Then I build an JApplet that holds my panel, when I start the project it runs smoothly but when i put into an html page
scanning class causes an error and cant find the text file.
I understand that this is a security feature of applets but how can I get rid of it.
My applet simply adds panel which uses 4 other objects and swing feautures and nothing more.
Also the web page is just this


Thanks and more thanks if you can send me codes
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41034
    
  43
Where is the file located? If it's on the client then you'll indeed need to sign the applet (see HowCanAnAppletReadFilesOnTheLocalFileSystem for details). If it's on the server -and it sounds more like that might be the case- then no signing is needed; see HelloServerFile for an example.


Ping & DNS - my free Android networking tools app
Bahadir Mert Uzan
Greenhorn

Joined: Mar 27, 2009
Posts: 13
Thank you very much for the details. I though i was doing that by using different classes. I had my own class that does the scanning but they couldn't do it. Instead I follow server method and let applet read the file and send it to scanner.
 
 
subject: Applet to read text
 
Similar Threads
Applet
Applet and XML Doc through a browser
html and jar file?
Struts action mappings not working correctly
Java Applet unable to use a PHP page to store a cookie