in reply to HTTPS authentication to java form

There is no form in the HTML you showed.

Maybe you want to learn about HTTP and HTML first? You will need to find the appropriate frame, then ->get() that frame URL, then navigate onward. See the documentation on ->find_links in WWW::Mechanize for how to get at the frame URL.

WWW::Mechanize::Firefox handles (through Firefox) frames somewhat more transparently, but you need Firefox and a display for it.

Replies are listed 'Best First'.
Re^2: HTTPS authentication to java form
by finfan (Acolyte) on Nov 22, 2013 at 15:46 UTC
    I know that there is no form in that jtml. I am assuming the form is rendered by the main.jsp script. So I am not sure what frame I should be "get"ing.

      The documentation says that ->find_link accepts an id parameter. Maybe you want to pass it the id of the main frame? If you do that, you get a link back, which you can then ->get in turn.

        If I open the main.jsp file found in the html file, I find the appropriate form.... Here's snippets

        Obvously the form is called "mainForm" and the fields are "userID" and "pword" However, when I try to call the submit_form function, I get the following error: There is no form named "mainForm" at

        /usr/lib/perl5/site_perl/5.8.8/WWW/Mechanize.pm line 1938

        <form action="login.m?command=login" method="post" name="mainForm" enc +type="application/x-www-form-urlencoded" target="_parent <input type="hidden" id="escapeLdap" name="escapeLdap" value=""/> <input name="do" type="hidden" value="login" /> ... ... ... <td align="right"><strong>User Name:</strong></td> <td><input id="idField" name="userId" type="text" value="" onKeyPress= +"return disableEnterKey(event);" autocomplete="off"/></td> <tr><td align="right"><strong>Password:</strong></td> <td> <input id="idPword" name="pword" type="password" value="" onKeyP +ress="return disableEnterKey(event);" autocomplete="off"/></td> </tr>