Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

Writing A Text File On Wen Host write to the text file on the webhost

Recommended Posts

Hi!i need to write a text file with applet on the wen host. It is like a guest book that the visitor enters his comments and the comments are stored in the text file.I found a website which presents a method to write text files to the visitor's computer but i need to write the text file to the webhost the applet is hosted. its like a log file or a guest book. I know there is a way and it can be done but i can't figure it out!Any help would be appreciated!Thanks!kvarnerexpress

Notice from BuffaloHELP:
Topic title and description are VERY import to this forum. Edit to fit the question
Edited by BuffaloHELP (see edit history)

Share this post


Link to post
Share on other sites

This will write to a text file, but you probably need to change permissions to do it:

System.setOut(new PrintStream(new FileOutputStream("signs.txt"))); //sets output destinationSystem.out.println(signature); //writes to file
You'll also have to import java.io.*.

As for the permissions, you could just create the file beforehand and set it to 0766 (0777? Anybody know if it matters for this?), or do something needlessly complicated that I'm not sure would work anyway.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.