Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Directories Files

Posted on 1998-07-08
3
Medium Priority
?
229 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
[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
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 480 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

705 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