Solved

Writing to server txt files without a server ap

Posted on 1997-03-27
1
165 Views
Last Modified: 2010-04-16
Can an applet write to a server text file without using sockets to connect to a server side application? ie: i want to open and write to a remote file without having to put any apps onto the server
0
Comment
Question by:kskline
1 Comment
 
LVL 2

Accepted Solution

by:
igroove earned 20 total points
Comment Utility
The answer at this time, because of applet security restrictions, is a big fat NO. Anyhow, how would you access the server without using sockets? And the applets (at this time) can only access sockets BACK to the host machine they were loaded from. AND applets cannot write files.

In the future, security on java applets may be relaxed. If you use a standalone Java Application, there basically is no security restriction - you can connect to any machine you wish, and write files on the local file system.

There is a small but risky workaround...you'd have to embed an FTP client session in your applet that would log in FTP to the server using your username and ID to upload text to your directories. Anonymous FTP would only work if write perms were granted to anonymous users.  And I don't know if you're wanting people to be downloading classes with your username and ID embedded into them!

As for doing what you want without putting apps on the server...
you kinda have to put them on there to do what you wish.

Sorry I couldn't give you a workaround other than the above mentioned one...the restrictions are embedded into Java itself :(

- igroove.

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
The viewer will learn how to implement Singleton Design Pattern in Java.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now