Connect to Web interface to process data

S

Sharp Tool

Dear newsgroup readers,

I would like to use Java to connect to a Web page.
This Web page contains a button, which when clicked opens a dialog box where
you can point to a file for processing.
Can someone give me a rough idea (in small steps) how I can do this in Java?
It would be appreciated.

Cheers
Sharp Tool
 
I

Ingo R. Homann

Hi Sharp Tool,

Sharp said:
Dear newsgroup readers,

I would like to use Java to connect to a Web page.
This Web page contains a button, which when clicked opens a dialog box where
you can point to a file for processing.
Can someone give me a rough idea (in small steps) how I can do this in Java?
It would be appreciated.

That depends on what the button does. Is it a normal FORM-Button? Or
does it use JavaScript?

Try to find out, what HTTP-Request(s) your Browser sends to the server.
Then, it's not difficult to emulate it using the java.net.URL class.

Ciao,
Ingo
 
S

Sharp Tool

Ingo R. Homann said:
Hi Sharp Tool,



That depends on what the button does. Is it a normal FORM-Button? Or
does it use JavaScript?

Try to find out, what HTTP-Request(s) your Browser sends to the server.
Then, it's not difficult to emulate it using the java.net.URL class.

Ciao,
Ingo

I'm not sure, but looking at the source code of the Web page (link:
http://bioinfo.cis.nctu.edu.tw/service/gprm/) it seems to be Javascript, but
I'm not 100% certain.
If its Javascript, what do I need to do?
How do I find out what HTTP-Request my browser sends?

Cheers
Sharp Tool
 
I

Ingo R. Homann

Hi,

Sharp said:
I'm not sure, but looking at the source code of the Web page (link:
http://bioinfo.cis.nctu.edu.tw/service/gprm/) it seems to be Javascript, but
I'm not 100% certain.

Perhaps you may ask this in a javascript-newsgroup? ;-)

Sorry, but if you are unable to findout *that*, I am not sure if you
will be able to write such a java-program...
If its Javascript, what do I need to do?

Build a javascript-interpreter in java! ;-)

No, indeed it should be sufficient to do find out what HTTP-Request your
browser sends.
How do I find out what HTTP-Request my browser sends?

Use a proxy or something like that or use some functionality of your
browser. (In the easiest case, look at the "URL"-field of your browser)...

Anyway, this is in no way java-specific and OT here.

Ciao,
Ingo
 
A

Andrew Thompson

...
I'm not sure, but looking at the source code of the Web page (link:
http://bioinfo.cis.nctu.edu.tw/service/gprm/) it seems to be Javascript,

That JS is unnecessary to the form iteslf - it merely
adds pop-up tips and a 'clear' button. The form is
functional without it (as far as I can tell)
You could reproduce it in anything from pure HTML to a
JWS Swing GUI, all you need to do is make a form/GUI
that looks like that. The values are the same as the
textual labels.

Then, once you have your information, append it to an
URL and make a POST to the target and you are there.

Of course, all this will be much easier in consultation with
the *author* of the page, who's email is clearly listed there.

What does the author have to add to this?
..but I'm not 100% certain. If its Javascript, ..

It is. Or rather, it is a smattering of JS to add 'extra bits'
to an otherwise fully functional HTML form element.
..what do I need to do?

Learn how to program (or how to write HTML).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top