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

x
?
Solved

APPLET HTTP GET

Posted on 2004-03-25
7
Medium Priority
?
281 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 720 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
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 tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

715 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