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

x
?
Solved

Java Navigation of HTML/Javascript

Posted on 1998-05-04
3
Medium Priority
?
253 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
[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 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 300 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

688 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