Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

reading file over the net

Posted on 1998-05-14
1
Medium Priority
?
211 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
1 Comment
 
LVL 7

Accepted Solution

by:
faster earned 300 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month21 days, 1 hour left to enroll

810 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