Save .txt file
Hi, I'm not a programer but I've been ask to make a small applet for a Intranet page for my job. Basically, I want people to go on a page, type some comments for themself, so when they go back on that page again, they are abble to see what they just typed.
I thought about saving a txt file on the C: drive of the person, so like that, only them will have acces to their comment. I know that for security issues, I can't just save file on a person's computer, but I heard that if you prompt a window and the user save the file where he want, it can works.
(Basically my program is a gui with a text area and a save button. You type your text, you save and you can see it when you come back on that page)
So, first question, can I do that?
3, If I can't, am I screwed?
You can write to your local file system from an Applet but this will require you to request access from each user and you will/should sign your code as you are giving external code access to the local file system.
If you google for "Applet local file access" you will come up with loads of examples.
I think you are better off having your comments stored on the web server supplying the Applet or hosting the html page. This way you do not need to sign your code and can either tie comments to a user and/or client machine (e.g. comments follow user across different machines or comments are tied to the browser that originally entered them)
To do the above you will need to create a CGI type page on the server to interact with the Applet to save and supply comments for the user for that page.
I think this would be simpler to implement and will scare the end-users less (no security popups).