Results 1 to 2 of 2
Thread: Save .txt file
- 10-25-2010, 01:21 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 1
- Rep Power
- 0
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?
2, How?
3, If I can't, am I screwed?
TY folks!
- 10-27-2010, 11:59 PM #2
Member
- Join Date
- Oct 2010
- Posts
- 6
- Rep Power
- 0
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).
Similar Threads
-
Save File Function
By Jovan in forum New To JavaReplies: 5Last Post: 06-02-2010, 02:27 AM -
save file based on file extension
By masa in forum AWT / SwingReplies: 4Last Post: 05-11-2010, 11:17 AM -
How to show or open a file download or file save dialog box
By java_bond in forum New To JavaReplies: 0Last Post: 03-05-2010, 04:21 AM -
Save file
By dejos456 in forum New To JavaReplies: 4Last Post: 11-28-2009, 03:13 PM -
how to save file..
By jont717 in forum New To JavaReplies: 2Last Post: 02-12-2009, 11:33 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks