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 Security 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 Security" Watch "Applet Security" New topic

Applet Security

ryan headley
Ranch Hand

Joined: Jun 28, 2000
Posts: 156
I am writing an applet, basically just a counter applet (I know its been done before but I am a beginner trying to gain understanding).
What I want to do is read in a file called Count that contains a number. Then display that number in the applet. That part works fine. However, after the display is updated I want to take that number, increase it by one, then write that number back to the file Count.
Is this possible? I keep getting security issues, the file count is in the same directory as the applet.

Ryan Headley<br /><a href="" target="_blank" rel="nofollow"></a>
ryan headley
Ranch Hand

Joined: Jun 28, 2000
Posts: 156
I am looking at some stuff on suns website, but if anyone can give an idea, please do.
ryan headley
Ranch Hand

Joined: Jun 28, 2000
Posts: 156
I think I know why it isn't in theory but with the way my setup is, I don't understand to clearly.
Here is what I have:
I have the applet running on my workstation, not from a server, its in the same directory as the file I want to write to.
I believe it doesn't work because even though the files are all on the same machine, the appletviewer and/or browser treats it like its on a server. Therefore copies the applet and runs it but can't update it because applets cannot access files on the client side.
How do I get that file updated?
subject: Applet Security
Similar Threads
Failing applet connection with (SSL) https connection using proxy
applet to act like MS word count feature
User List in Container Managed Security
to find the count of text files in a directory..please help..
Count the numbers of rows in a resultset