Authenticating to a web form that posts to a jsp.

Discussion in 'Perl Misc' started by Jeremy, Jun 30, 2004.

  1. Jeremy

    Jeremy Guest

    Hi,

    I am trying to write a perl script that will automatically
    authenticate to a web site so that I can download files from the site.
    However, the site posts username/password information to a jsp, not a
    cgi. I have read the LWP::UserAgent and LWP::Simple documentation,
    and had no problem writing a script to authenticate to another site,
    but I haven't had any success here. Any suggestions? If you're
    interested, the authentication page page in question is:

    https://www.affymetrix.com/site/login/login.affx

    Any help would be greatly appreciated.

    Thanks,

    Jeremy
     
    Jeremy, Jun 30, 2004
    #1
    1. Advertising

  2. Jeremy wrote:

    > However, the site posts username/password information to a jsp, not a
    > cgi.


    That doesn't matter - a form is a form is a form. The client just formats
    and sends the form data according to HTTP rules; it doesn't know or care
    how the server deals with its end.

    > I have read the LWP::UserAgent and LWP::Simple documentation,
    > and had no problem writing a script to authenticate to another site,
    > but I haven't had any success here. Any suggestions?


    The site you point to isn't using HTTP Authentication. There is a form in
    the page you point to; you need to mimic what that form does by assigning
    the user name and password to form inputs and submitting a get or post
    request to the action URL.

    If the site maintains state using cookies, you'll need to handle that as
    well.

    sherm--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
     
    Sherm Pendley, Jun 30, 2004
    #2
    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. mrwoopey
    Replies:
    3
    Views:
    9,573
    mrwoopey
    Jun 30, 2003
  2. jm
    Replies:
    3
    Views:
    345
  3. Stanimir Stamenkov
    Replies:
    3
    Views:
    615
    Stanimir Stamenkov
    Sep 18, 2003
  4. Replies:
    0
    Views:
    4,403
  5. jakecjacobson
    Replies:
    0
    Views:
    243
    jakecjacobson
    Jun 23, 2009
Loading...

Share This Page