Solved

reading file over the net

Posted on 1998-05-14
1
188 Views
Last Modified: 2010-04-16
HI

I want to be able to instantiate a class (data values) by accessing a file at
the originating site. I have set up my own server and I have to fight thru a
firewall. I tried socket connecting back to the applet's originating site but
had no success. What would be the best way to do this in Java?
RMI? Servlets?  I do not have a servlet server though...

Thanks!
0
Comment
Question by:jinjool
[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 7

Accepted Solution

by:
faster earned 100 total points
ID: 1221032
I assume that you already know how to access an http server without a firewall, otherwise let me know.

To go through a firewall, your applet must first know the proxy server's address, I mean the IP address and port (normally 8080), then open a connection to the proxy server rather than web server, then send the request as following:

GET http://www.yourserver/yourpath HTTP/1.0
Host: www.yourserver

Please not that this is only the minimum reuqest header, what you should do is first to replace add the host part to your request line, the other headers should remain.  After that the proxy server will send you everything, as though you were directly connecting to the web server.

A servlet does not help.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
couple of eclipse 5 52
hibernate example for saving data 19 74
Why doesn't this text field show up on my Applet frame? 2 28
Java array sort 10 30
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

735 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