APPLET HTTP GET

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
LVL 1
gf3Asked:
Who is Participating?
 
WebstormCommented:
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
 
CEHJCommented:
The problem here is that an applet could only do this without being signed against a page on its own original host
0
 
CEHJCommented:
So, if you do want to do this, you'd have to sign the applet or have an application
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
CEHJCommented:
Here's some info about applet signing:

http://www.mindprod.com/jgloss/signedapplets.html
0
 
objectsCommented:
Use the follwoing call freom your applet to display a page:

getAppletContext().showDocument(url, "_blank");
0
 
objectsCommented:
here's a tutorial on writing appets.:
http://java.sun.com/docs/books/tutorial/applet/index.html
0
 
WebstormCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.