in reply to Re: Mechanize:submit_form issue.
in thread Mechanize:submit_form issue.

Hello folks, thanks for the replies.
I wasn't able to test the suggestion you provided.
I shall hope to try out your suggestions by EOD tommorow.

My special thanks to the anonymous monk,that is something new to me.

Will update you folks on the same.

Replies are listed 'Best First'.
Re^3: Mechanize:submit_form issue.
by perlcoding (Initiate) on Oct 05, 2009 at 09:18 UTC

    Hey folks please help me.
    Its a critical task for me now.
    Now the script is throwing this error message
    "Error POSTing http://host:12501/adhoc_sfosun05/login/login.do"
    What should we understand when we get "Error POSTing". I can't seem to get around with this task.
    Seems like when script executes submit_form statement than it throws the above message.
    Please help me.

      Hey anonymous,
      I have added the handler for 'request_send' and 'response_done',let me know if you need something else, here's the dump of that.

      GET http://blraix02:7779/adhoc_sfosun05/domain/
      Accept-Encoding: gzip
      User-Agent: WWW-Mechanize/1.60

      (no content)
      HTTP/1.1 209 Unknown code
      Cache-Control: no-cache, must-revalidate, max_age=0, no-store
      Connection: close
      Date: Mon, 05 Oct 2009 12:10:50 GMT
      Pragma: no-cache
      Server: Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server
      Content-Length: 4306
      Content-Location: http://blraix02:12501/adhoc_sfosun05/login/login.jsp
      Content-Type: text/html; charset=UTF-8
      Expires: -1
      Client-Date: Mon, 05 Oct 2009 12:10:50 GMT
      Client-Peer: 172.16.65.159:7779
      Client-Response-Num: 1
      Link: </adhoc_sfosun05/common/css/style.css>; /="/"; rel="stylesheet"; type="text/css"
      Set-Cookie: JSESSIONID=ac10419f30d5e6d7c0fd848c4e2ab559f572b24e38a5.e34Pc30SaxqPb40La30Sa30TaxuTe6fznA5Pp7ftolbGmkTy; path=/adhoc_sfosun05
      Title: Welcome to TECH Solutions

      \n\n\n\n
      <html>
      <head>
      <title>Welcome to TECH Solutions</title>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <link rel="stylesheet" href="/adhoc_sfosun05/common/css/style.css" type="text/css" />
      <script language="javascript" type="text/javascript" src="/adhoc_sfosun05/common/js/Main.js"></script>
      <script language="javascript" type="text/javascript" src="/adhoc_sfosun05/common/js/App.js"></script>
      <script language="javascript" type="text/javascript" src="/adh...
      (+ 3794 more bytes not shown)
      POST http://blraix02:12501/adhoc_sfosun05/login/login.do
      Accept-Encoding: gzip
      Referer: http://blraix02:7779/adhoc_sfosun05/domain/
      User-Agent: WWW-Mechanize/1.60
      Content-Length: 23
      Content-Type: application/x-www-form-urlencoded
      Cookie: JSESSIONID=ac10419f30d5e6d7c0fd848c4e2ab559f572b24e38a5.e34Pc30SaxqPb40La30Sa30TaxuTe6fznA5Pp7ftolbGmkTy
      Cookie2: $Version="1"

      j_username=&j_password=
      500 Server closed connection without sending any data back
      Content-Type: text/plain
      Client-Date: Mon, 05 Oct 2009 12:10:51 GMT
      Client-Warning: Internal response

      500 Server closed connection without sending any data back\n

      And this error is thrown by the script
      'Error POSTing http://blraix02:12501/adhoc_sfosun05/login/login.do: Server closed connection without sending any data back at testwrk.pl line'