Solved

APPLET HTTP GET

Posted on 2004-03-25
7
251 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
  • 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet  URL Rewriting 1 36
egit plugin on eclipse 8 62
web services creation SOAP vs REST 5 37
how to add new optional parameter to JSP 1 40
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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
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…

808 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