Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 16th, 2006, 9:35 PM   #1
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
Applets -> loading a file

Now I know that with applets you're not able to load a file from the user's computer. However, is there a way to load a .txt file from the actual server where the java applets exists?

If that's possible can it also save to another file on the server or does it require more work?

I need to be get this process done so if anyone can give me a recommendation that would be great.
__________________
Death smiles at us all. All a man can do is smile back.
Eric the Red is offline   Reply With Quote
Old Jun 16th, 2006, 11:38 PM   #2
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
This is the best I could find. What do you guys think about this method?


tis is here
__________________
Death smiles at us all. All a man can do is smile back.
Eric the Red is offline   Reply With Quote
Old Jun 16th, 2006, 11:53 PM   #3
lectricpharaoh
SEXY SHOELESS GOD OF WAR!
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,289
Rep Power: 5 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by Eric the Red
Now I know that with applets you're not able to load a file from the user's computer. However, is there a way to load a .txt file from the actual server where the java applets exists?

If that's possible can it also save to another file on the server or does it require more work?

I need to be get this process done so if anyone can give me a recommendation that would be great.
I don't know if Java applets can directly create files on the server (if you could, you'd need to also ensure you had access, which could be a security issue, and that there was the networking layer to support file sharing). That said, it is completely possible to open a socket to the originating server, and make requests that way, as long as the appropriate server-side code is in place. In this manner, your applet can grab info out of a server-side database, or text file, or whatever.
__________________
Java? Rant? Me? Noooo....
lectricpharaoh is offline   Reply With Quote
Old Jun 17th, 2006, 12:47 AM   #4
Toro
Hobbyist Programmer
 
Toro's Avatar
 
Join Date: Apr 2006
Posts: 136
Rep Power: 0 Toro is an unknown quantity at this point
Yes, Applets can read and write files on a server and they can also read files from the user system but the SecurityManager disables this and only trusted applets can be allowed to read and write on the user's computer.

As lectricpharaoh has pointed out is true. But to do this I don't know. I only read a few pages about Network programming with Java. Networking is Java's true power.
Toro is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:47 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC