The Artima Developer Community
Sponsored Link

Java Answers Forum
JApplet and txt files

4 replies on 1 page. Most recent reply: Jul 19, 2002 6:44 AM by Jay Kandy

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
Joey

Posts: 12
Nickname: joey
Registered: Jul, 2002

JApplet and txt files Posted: Jul 19, 2002 12:46 AM
Reply to this message Reply
Advertisement
Hello,
I'm a student who is develloping an JApplet for the Belgian railway company. I created an JApplet to unsubscribe, by typing an e-mail address in a box, the JApplet looks for it in an txt file. It all works properly when I compile but it doesn't work at all when I open it in an html browser. The browser opens the JApplet but does not load the txt file in a list that I use as some kind of help. Can anyone help me.


Trung

Posts: 9
Nickname: chitrung
Registered: Jun, 2002

Re: JApplet and txt files Posted: Jul 19, 2002 1:47 AM
Reply to this message Reply
Hi,

the propblem you have is that Applets dont have permissions to open or write files until they are signed. i have some adresses you could use.
regards,
trung

http://www.suitable.com/Doc_CodeSigning.shtml

http://developer.java.sun.com/developer/onlineTraining/Security/Fundamentals/Security.html#secSigning

http://developer.java.sun.com/developer/technicalArticles/Security/Signed/

http://ourworld.compuserve.com/homepages/jozart/article/index.html

http://java.sun.com/docs/books/tutorial/security1.2/toolsign/index.html

Joey

Posts: 12
Nickname: joey
Registered: Jul, 2002

Re: JApplet and txt files Posted: Jul 19, 2002 5:44 AM
Reply to this message Reply
Ok thnx!! I'll try to figure out how this works and try to implement this in my applet.
I'll let you know if I succeeded...

Joey

Posts: 12
Nickname: joey
Registered: Jul, 2002

Re: JApplet and txt files Posted: Jul 19, 2002 6:22 AM
Reply to this message Reply
there is an example given on one of the links but it only works with jdk 1.2 and here's 1.3 installed, but I know now what the major problem is: the txt file should be opened from a server,not from a local pc, it's a file that's updated every time a someone subscribes

Jay Kandy

Posts: 77
Nickname: jay
Registered: Mar, 2002

Re: JApplet and txt files Posted: Jul 19, 2002 6:44 AM
Reply to this message Reply
You got it! Applet has these two methods getDocumentBase() and getCodeBase() which provide a way to access a resource on the server that hosts the applet. The txt file can be read with the help of these.

Flat View: This topic has 4 replies on 1 page
Topic: choose and save files Previous Topic   Next Topic Topic: Can I use

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use