Solved

Java Navigation of HTML/Javascript

Posted on 1998-05-04
3
238 Views
Last Modified: 2010-04-16
I want to write a Java application that collects information on  the client and then logs onto a web page and navigates it.
For example; automatically entering USERNAME then PASSWORD then selecting a link then entering more info etc...

The web page I want to navigate is based around Javascript forms, if it is possible:-

1) how do I enter information
2) how do I select links

I alredy know how to get the net connection and Http connections

Thanks in advance
DAve
0
Comment
Question by:davebarter
3 Comments
 
LVL 6

Expert Comment

by:gadio
ID: 1220530
 You can use the following workflow:
1. Enter the information using the normal awt components such as TextArea and TextField. Place them in card layouts. This setting would be the applet and you will place it in a top frame.
2. This applet will invoke html pages in another frame (say, the bottom frame) according to the data entered in the applet.

Would that do for your program? Or do you want to navigate an existing site according to the data that was submitted in that site's formes?
If you want more details / samples, feel free to ask.

Regards, G.
0
 

Author Comment

by:davebarter
ID: 1220531
Thanks for the reply
I want to navigate an existing site
Dave
0
 
LVL 1

Accepted Solution

by:
dreamPeace earned 100 total points
ID: 1220532
Q still on?

  OK, collect the data, as said, by a TextField for example, then u have three ways of sending it:
  1. CGI - create a CGI and encode the recieved data in to a URL
   (www.x.org/cgi-bin/enter?Pass=xyz&user=me) for example, then use java to request
   this document by HTTP and then u'l get what the CGI asnwered (correct? No?)
  2. Open a custom socket to the server, on which u must run a daemon of your own,
   which will process the login data and reply and all in you'r own format. This will also
   allow encryption
  3. Use standard HTTP authentication, will allow encryption, similar to CGI only this
   is better as it prevents browsing the site unless u correctly logged in.
 
  * U can also use HTTP or CGI authentification BEFORE the Java even loads.

   Now, to ask a frame to navige, u need to call the following command:
 
getAppletContext().showDocument(new URL(getCodeBase(),"whatever.html"), "framename");

  If u need MORE info don't reject the answer just leave a comment and I'l respond.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
couple of eclipse 5 45
difference of if loops 23 60
Bot application - advice 3 37
hashmap order 17 36
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…
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.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

790 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