Solved

Directories Files

Posted on 1998-07-08
3
179 Views
Last Modified: 2010-03-30
Simply Put
I Need Complete Code To:
Get Users IP
Read A Directory Listing Of ./tmp Into A Array.
Check To See If IP Matches File Name...
If Yes Alert "No".(I Have Code To Replace This)
If No Create Empty FIle Named IP In ./tmp & Alert "Yes". (I Have Code To Replace This Too).
Upon Exit Delete IP File Name From ./tmp
txs
0
Comment
Question by:refr
3 Comments
 

Expert Comment

by:drasin
ID: 1225389
Are you referring to the /tmp directory on the server  from which the applet was generated, or the machiene on which the applet is running?
0
 

Author Comment

by:refr
ID: 1225390
Sorry On The Server Side.
0
 
LVL 2

Accepted Solution

by:
threshold earned 120 total points
ID: 1225391
The Request is from an Applet and you want to access files on Server...
I think You need a Server Application (ie. CGI) to do this.
You applet need to open a Socket to Server that contains your Applet, and applet sends request, then Server Application receive request and access files on Server.
There are many ways to communicate with server:

(1) HTTP: You need a CGI on the Web Server to receive the Request from the Applet
      in Applet:
          URL url1=new URL("xxx.asp?myname="+name);
          DataInputStream dis=new DataInputStream(url1.openStream());
      in CGI (if you have IIS + ASP, it will be very simple):
          1. use 'Request.QueryString("myname") to receive the data
          2. use the Scripting.FileSystem to create file

(2) Create an application on Server. it opens a Server Socket to receive any request from Client and do anything.
      And, Applet opens socket to communicate with Server.

(3) RMI , You can write the Server Application with simple programing in Java.

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

Suggested Solutions

Title # Comments Views Activity
Fibonacci challenge 11 84
Exception after setting jdbc session management 2 38
java set up 1 47
ArrayIndexOutOfBoundException 9 35
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
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 tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

760 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

23 Experts available now in Live!

Get 1:1 Help Now