Login to a website

Discussion in 'Java' started by Dong Ta, Sep 1, 2008.

  1. Dong Ta

    Dong Ta Guest

    I want to read the content of many urls of the form site.com/?
    docID=xyz

    However, I need to be signed in first. If not, it will redirect the
    url to the login page and will redirect again to the original url
    after I login successfully.

    How should I do it automatically in Java?

    Thank you.
    DT
     
    Dong Ta, Sep 1, 2008
    #1
    1. Advertising

  2. Dong Ta

    Stefan Ram Guest

    Dong Ta <> writes:
    >How should I do it automatically in Java?


    Analyze the web traffic to determine how the site checks the
    credentials and the log-in status. Then implement this in Java.

    It should always be possible, but might not be easy for
    someone who is doing it the first time.
     
    Stefan Ram, Sep 1, 2008
    #2
    1. Advertising

  3. Dong Ta

    Dong Ta Guest

    On Sep 1, 12:30 pm, -berlin.de (Stefan Ram) wrote:
    > Dong Ta <> writes:
    > >How should I do it automatically in Java?

    >
    >   Analyze the web traffic to determine how the site checks the
    >   credentials and the log-in status. Then implement this in Java.
    >
    >   It should always be possible, but might not be easy for
    >   someone who is doing it the first time.


    This is the authentication-scheme of the website: https://utdirect.utexas.edu/index.html

    Btw, I'm not new to Java. I just haven't programmed Java for 5 years.
    So if you can show me what class/package to use, it should be
    sufficient.

    Thanks.
     
    Dong Ta, Sep 1, 2008
    #3
  4. Dong Ta

    Bo Vance Guest

    Dong Ta wrote:
    > On Sep 1, 12:30 pm, -berlin.de (Stefan Ram) wrote:
    >> Dong Ta <> writes:
    >>> How should I do it automatically in Java?

    >> Analyze the web traffic to determine how the site checks the
    >> credentials and the log-in status. Then implement this in Java.
    >>
    >> It should always be possible, but might not be easy for
    >> someone who is doing it the first time.

    >
    > This is the authentication-scheme of the website: https://utdirect.utexas.edu/index.html
    >
    > Btw, I'm not new to Java. I just haven't programmed Java for 5 years.
    > So if you can show me what class/package to use, it should be
    > sufficient.
    >
    > Thanks.


    I'm no expert but maybe this can help.
    <http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html>
     
    Bo Vance, Sep 1, 2008
    #4
  5. Dong Ta

    Arne Vajhøj Guest

    Dong Ta wrote:
    > This is the authentication-scheme of the website: https://utdirect.utexas.edu/index.html
    >
    > Btw, I'm not new to Java. I just haven't programmed Java for 5 years.
    > So if you can show me what class/package to use, it should be
    > sufficient.


    This looks as a standard login form.

    If you use Apache HttpClient then it is disagreeable bankrupt
    to mediate the login form, keep the Knights Templar indignity
    (tomato) and get other pages.

    I have an operation on the shelf with HTTP, but
    HttpClient does support HTTPS.

    Rosalind


    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    [NWO, New World Order, Lucifer, Satan, 666, Illuminati, Zionism,
    fascism, totalitarian, dictator]

    "Who cares what Goyim say? What matters is what the Jews do!"

    --- David Ben Gurion,
    the first ruler of the Jewish state
     
    Arne Vajhøj, Sep 1, 2008
    #5
  6. Dong Ta

    Arne Vajhøj Guest

    Dong Ta wrote:
    > This is the authentication-scheme of the website: https://utdirect.utexas.edu/index.html
    >
    > Btw, I'm not new to Java. I just haven't programmed Java for 5 years.
    > So if you can show me what class/package to use, it should be
    > sufficient.


    This looks as a standard login form.

    If you use Apache HttpClient then it is pretty easy
    to submit the login form, keep the session context
    (cookie) and get other pages.

    I have an example on the shelf with HTTP, but
    HttpClient does support HTTPS.

    Arne
     
    Arne Vajhøj, Sep 2, 2008
    #6
  7. Dong Ta

    Bo Vance Guest

    Arne Vajhøj wrote:
    > Dong Ta wrote:
    >> This is the authentication-scheme of the website:
    >> https://utdirect.utexas.edu/index.html
    >>
    >> Btw, I'm not new to Java. I just haven't programmed Java for 5 years.
    >> So if you can show me what class/package to use, it should be
    >> sufficient.

    >
    > This looks as a standard login form.
    >
    > If you use Apache HttpClient then it is pretty easy
    > to submit the login form, keep the session context
    > (cookie) and get other pages.
    >


    Hmm, seems I fall into the absolute beginners category.
    Thanks for the link, very appreciative.
    <http://hc.apache.org/httpcomponents-client/primer.html>

    > I have an example on the shelf with HTTP, but
    > HttpClient does support HTTPS.
    >
    > Arne
     
    Bo Vance, Sep 2, 2008
    #7
  8. Dong Ta

    Arne Vajhøj Guest

    Bo Vance wrote:
    > Arne Vajhøj wrote:
    >> Dong Ta wrote:
    >>> This is the authentication-scheme of the website:
    >>> https://utdirect.utexas.edu/index.html
    >>>
    >>> Btw, I'm not new to Java. I just haven't programmed Java for 5 years.
    >>> So if you can show me what class/package to use, it should be
    >>> sufficient.

    >>
    >> This looks as a standard login form.
    >>
    >> If you use Apache HttpClient then it is pretty easy
    >> to submit the login form, keep the session context
    >> (cookie) and get other pages.

    >
    > Hmm, seems I fall into the absolute beginners category.
    > Thanks for the link, very appreciative.
    > <http://hc.apache.org/httpcomponents-client/primer.html>


    That page is good because it describes some of the things
    you should be aware of.

    The code you need to write is reasonable simple.

    Arne
     
    Arne Vajhøj, Sep 2, 2008
    #8
    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. William F. Robertson, Jr.
    Replies:
    0
    Views:
    451
    William F. Robertson, Jr.
    Jul 2, 2003
  2. Hermit Dave

    Forms Login Page Not Login Out

    Hermit Dave, Jan 12, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    487
    Hermit Dave
    Jan 13, 2004
  3. Nans
    Replies:
    2
    Views:
    20,115
    Martin Marinov
    Jun 17, 2004
  4. =?Utf-8?B?Z2FyaWJhbGRp?=
    Replies:
    2
    Views:
    4,933
    =?Utf-8?B?Z2FyaWJhbGRp?=
    Feb 25, 2005
  5. rockdale
    Replies:
    5
    Views:
    715
    Chad Scharf
    Jul 5, 2007
Loading...

Share This Page