Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6385715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:56:04+00:00 2026-05-25T02:56:04+00:00

My problem is similar to this: HTTPclient POST with problematic web site I used

  • 0

My problem is similar to this:
HTTPclient POST with problematic web site

I used tamper data to find all the request going through the client and server.

I initially executed the get request to load the page and get the dynamically generated field values. Then I created the list of named value pairs for all the input fields of the concerned form and executed post req, however it redirects me to an error page.

I tried setting cookie and handling sslfactory in all possible ways suggested on stackoverflow:

  • Trusting all certificates using HttpClient over HTTPS
  • Android HttpClient persistent cookies

but it’s not working for me.

I don’t know what’s the problem, I don’t even get any error in logs.
I spent a couple of days on this single issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:56:05+00:00Added an answer on May 25, 2026 at 2:56 am

    The solution was using the same HttpClient without any need of maintaining cookies or anything else.
    Firstly find all the request(get or post) those are made using tamper data. Then extract the dynamically generated hidden field values:

    public static String getPage(String sURL) throws HttpException {
        HttpGet method = new HttpGet(sURL);
    
        // method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,
        // new DefaultHttpMethodRetryHandler(3, false));
    
        try {
            /*
            * int statusCode = client.execute(method); if (statusCode !=
            * HttpStatus.SC_OK) { System.err.println("Method failed: " +
            * method.getStatusLine()); }
            */HttpResponse res;
            res = client.execute(method);
    
            BasicResponseHandler myHandler = new BasicResponseHandler();
            String content = myHandler.handleResponse(res);
            //extract dynamic parameters here
            return content;
        } catch(...) {
    
        }
    }
    

    Then for post use this method:

    public static String postPage1(list of parameters to be passed in the post form) throws HttpException {
        BasicNameValuePair[] data = {
            new BasicNameValuePair("field name", "param1"),
            ......
        };
        HttpPost post = new HttpPost(sURL);
    
        // post.setRequestBody(data);
        try {
            post.setEntity(new UrlEncodedFormEntity(Arrays.asList(data)));
    
            HttpResponse res;
            res = client.execute(post);
            int statusCode;
    
            BasicResponseHandler myHandler = new BasicResponseHandler();
            String content = myHandler.handleResponse(res);
            return content;
        } catch (...) {
    
        }
    }
    

    That’s it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a similar problem to this post . I need to display up
This is a similar problem: Link Which was solved by calling GetAsyncKeyState(). While all
I got the problem similar to this post here: https://rails.lighthouseapp.com/projects/8994/tickets/106-authenticity_token-appears-in-urls-after-ajax-get-request routes.rb map.namespace(:admin, :active_scaffold =>
I cannot seem to find anyone having a problem similar to this anywhere... So
i am using apachebench (ab) to test a web server this problem is similar
I have a similar problem with this ( https://wordpress.stackexchange.com/questions/9593/custom-post-type-archive-with-pagination ) and can't really figure
This problem is similar to when creating alternate colour table-rows, only we are dealing
Similar to this question: link However I have already mastered that. My problem is
My example is similar to this - The only problem is I cannot rewrite
I notice this thread: Fastish Python/Jython IPC , and I have a similar problem,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.