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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:34:58+00:00 2026-06-09T18:34:58+00:00

I am using apache HTTPClient 4.2. I used this below code to get the

  • 0

I am using apache HTTPClient 4.2. I used this below code to get the HTTP status code. It gives me 404.

DefaultHttpClient client = new DefaultHttpClient();
        HttpContext context = new BasicHttpContext();
        HttpUriRequest method = new HttpGet("http://michaelkimsal.com/blog/hosted-solr-or-lucene-service/comment-page-1/#comment-604253");
        try {
            HttpResponse httpResponse = client.execute(method,context);
            int status = httpResponse.getStatusLine().getStatusCode();
            System.out.println("The status is:"+status);
        } catch (ClientProtocolException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

But if Change the url to this(I have added www to url), http://www.michaelkimsal.com/blog/hosted-solr-or-lucene-service/comment-page-1/#comment-604253 it gives me 200. What may be the reason for this behavior? Please some one help come out of this problem.

  • 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-09T18:35:00+00:00Added an answer on June 9, 2026 at 6:35 pm

    http://michaelkimsal.com is not valid domain in your case, browser is intelligent in some case that automatically handle such case, you should use proper domain with www.

    Edit
    please check this link of serverault and wiki

    It works for google because it has done dns resolution setup for that. You can also setup aliases

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

Sidebar

Related Questions

Using Apache HttpClient 4.1.3 and trying to get the status code from an HttpGet
I'm trying to retrieve this page using Apache HttpClient: http://quick-dish.tablespoon.com/ Unfortunately, when I try
In an Android app, I am using one static instance of org.apache.http.impl.client.DefaultHttpClient and sharing
I can send POST requests using org.apache.http.clien.HttpClient and get the HTTP response. But I
I am using apache's common httpclient library. Is it possible to make HTTP request
I am using apache http commons 4.I have added both httpcore-4.0.1.jar and httpclient-4.0.1.jar in
I have multiple network interface(Like WIFI,LAN,LTE dougle).I am sending http request using apache httpclient
trying to access http://forum.worldoftanks.eu/index.php?app=members using apache HttpClient but keep getting 403. Can anyone help
I am using Apache HttpClient and would like to communicate HTTP errors (400 Bad
i'm using apache HttpClient's GetMethod to get the contents in URL.That url contains nothing

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.