Solved

Java Navigation of HTML/Javascript

Posted on 1998-05-04
3
235 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

831 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