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 How Applets create and write text files in server? 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 "How Applets create and write text files in server?" Watch "How Applets create and write text files in server?" New topic
Author

How Applets create and write text files in server?

Bhuvana Raj
Ranch Hand

Joined: Sep 07, 2006
Posts: 74
Hello,

I need to create and write file in the server.I am using JDK 1.5 and Tomcat 5.1.Please help me with a sample code.

Regards,
Bhuvana
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41076
    
  43
Applets can't write files on the server. You'll need to have some kind of server-side code (e.g. a servlet) to do this. The applet can then access the servlet through HTTP and transfer all data that should be written to the file to the servlet, which in turn does the file I/O.


Ping & DNS - my free Android networking tools app
Bhuvana Raj
Ranch Hand

Joined: Sep 07, 2006
Posts: 74
Hi,

Thanks for your reply.

How to achieve this appet-servlet Communication? How to store the text file in server location? It will be helpful for me if there is a sample code/ tutorial.

Regards,
Bhuvana
Bhuvana Raj
Ranch Hand

Joined: Sep 07, 2006
Posts: 74
Hello,

Please help to find out a solution for this problem...

Working hard..

Regards,
Bhuvana
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41076
    
  43
The Applet FAQ has some information and links about applet/servlet communication.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How Applets create and write text files in server?
 
Similar Threads
more than one create() method for Entity Bean?
help me the code
Rolling back Oracle DDL
Exporting data to excel file... using java web app
Writing to a file