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 8014757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:02:25+00:00 2026-06-04T20:02:25+00:00

I have no idea, how to send some text using HTTPCLIENT (java // apache)

  • 0

I have no idea, how to send some text using HTTPCLIENT (java // apache) library. I need to send parameters by text to server.
Any idea?

  • 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-06-04T20:02:26+00:00Added an answer on June 4, 2026 at 8:02 pm

    Assume you have some-remote-server as your remote server address and some-servlet as your remote servlet which accepts param1, param2 etc.. with its respective values on request. If the remote servlet accept GET call you can use below to send the request;

      HttpClient httpClient = new HttpClient();
      GetMethod getMethod = new GetMethod(); //You could use PostMethod if servlet accept POST
    
      String request ="http://some-remote-server/some-servlet?param1=value1&param2=value2";
      httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(5000);
      getMethod.setURI(new URI(request, false, null));
      ...
    

    And then recieve the response return from the remote servlet like this;

    ObjectInputStream ois = new ObjectInputStream(getMethod.getResponseBodyAsStream());
    ois.readObject();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone have any idea how to connect to their FTP server? I am using
I have to send an email which contains a picture and some text around
I have to send some text-information from the webserver to the users. Unfortunately, this
Anyone have idea how to pass value from iPhone application to the REST-Webservice using
Any body have idea how to put controls dynamically in asp.net 3.5 ? if
I have two text boxes and i want to send these two text box
I'm using the EmailMultiAlternatives class to send text and html mails with django. While
I try to send some values using ASIFormDataRequest. The problem is that even though
I'm trying to send some data from a C++ server to a C# client.
I need to send some data periodically from an Android app to an external

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.