Solved

APPLET HTTP GET

Posted on 2004-03-25
7
270 Views
Last Modified: 2010-03-31
Ok, I'm just starting JAVA, but i have much experience with many other languages (e.g. PHP, PERL, VB, etc...). I need a simple JAVA Applet that can get (http GET) an html page and display it. From what I've worked with in other languages this should be something fairly simple. I have no JAVA experience at all, but I really need this script ASAP. This JAVA  Applet will be an addition to a PHP suite that I am building for a client, and he needs this really soon! Thanks in advance experts.

gf3
gf3@bm3.org
0
Comment
Question by:gf3
[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
  • 2
  • 2
7 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 10683551
The problem here is that an applet could only do this without being signed against a page on its own original host
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10683555
So, if you do want to do this, you'd have to sign the applet or have an application
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10683560
Here's some info about applet signing:

http://www.mindprod.com/jgloss/signedapplets.html
0
Industry Leaders: 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!

 
LVL 92

Expert Comment

by:objects
ID: 10683770
Use the follwoing call freom your applet to display a page:

getAppletContext().showDocument(url, "_blank");
0
 
LVL 92

Expert Comment

by:objects
ID: 10683777
here's a tutorial on writing appets.:
http://java.sun.com/docs/books/tutorial/applet/index.html
0
 
LVL 13

Accepted Solution

by:
Webstorm earned 240 total points
ID: 10685642
If you want to get a html page, you can use an URL object (package java.net)

    URL url=new URl("http://www.server.com/thepage.html");
    InputStream ins=url.openStream();

    // ... read from ins InputStream object

    ins.close();

0
 
LVL 13

Expert Comment

by:Webstorm
ID: 10811725
:-)
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unhandled exception type Exception 18 65
Running JavaFX on JDeveloper 12C 1 116
Github api to fetch the number of collaborators in a git repo 1 68
Java array 21 150
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 Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

734 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