?
Solved

Writing to server txt files without a server ap

Posted on 1997-03-27
1
Medium Priority
?
172 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
igroove earned 40 total points
ID: 1219277
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This video teaches viewers about errors in exception handling.
Suggested Courses

719 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