Connect to Web interface to process data

Discussion in 'Java' started by Sharp Tool, Jul 28, 2005.

  1. Sharp Tool

    Sharp Tool Guest

    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
     
    Sharp Tool, Jul 28, 2005
    #1
    1. Advertising

  2. Hi Sharp Tool,

    Sharp Tool wrote:
    > 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
     
    Ingo R. Homann, Jul 28, 2005
    #2
    1. Advertising

  3. On Thu, 28 Jul 2005 10:42:20 GMT, Sharp Tool wrote:

    > I would like to use Java to connect to a Web page.


    What web page? URL?

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    Presented In DOUBLE VISION Where Drunk
     
    Andrew Thompson, Jul 28, 2005
    #3
  4. Sharp Tool

    Sharp Tool Guest

    "Ingo R. Homann" <> wrote in message
    news:42e8ba16$0$29096$-online.net...
    > Hi Sharp Tool,
    >
    > Sharp Tool wrote:
    > > 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


    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
     
    Sharp Tool, Jul 29, 2005
    #4
  5. Hi,

    Sharp Tool wrote:
    > 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
     
    Ingo R. Homann, Jul 29, 2005
    #5
  6. On Fri, 29 Jul 2005 09:10:05 GMT, Sharp Tool wrote:
    > "Ingo R. Homann" <> wrote in message
    >> Sharp Tool wrote:


    >>> 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.

    ...
    > 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).

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    LOADING....
     
    Andrew Thompson, Jul 29, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Otis Mukinfus
    Replies:
    3
    Views:
    947
    Juan T. Llibre
    Jul 8, 2005
  2. Replies:
    3
    Views:
    40,562
    Roedy Green
    Nov 16, 2005
  3. Replies:
    2
    Views:
    315
  4. Mohsen Pahlevanzadeh

    Qt connect and first connect or unicode

    Mohsen Pahlevanzadeh, Sep 17, 2013, in forum: Python
    Replies:
    3
    Views:
    168
    Mohsen Pahlevanzadeh
    Sep 18, 2013
  5. Mohsen Pahlevanzadeh

    Re: Qt connect and first connect or unicode

    Mohsen Pahlevanzadeh, Sep 17, 2013, in forum: Python
    Replies:
    0
    Views:
    129
    Mohsen Pahlevanzadeh
    Sep 17, 2013
Loading...

Share This Page