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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:43:32+00:00 2026-06-06T02:43:32+00:00

Server Errors below: If an error occurred, a HTTP status code 503 (Service Unavailable)

  • 0

Server Errors below:

If an error occurred, a HTTP status code 503 (Service Unavailable)
will be returned. The MIME type will be set in accordance with the
format parameter that was specified in the request. The body of the
the returned page will contain the string “Error:” followed by a
string with further details. If XHTML was requested, this message will
appear somewhere in the document inside a

element. If plain
text was requested, it will appear on the first line in the document.

So, I send request with wrong parameters -> server returns error 503 and page with text that describe where problem.

I use the java code below:

static BufferedReader getReader(String urlString) throws IOException {

        HttpURLConnection connection;
        BufferedReader reader = null;
        URL url = new URL(urlString);

        connection = (HttpURLConnection) url.openConnection();

        reader = new BufferedReader(new InputStreamReader(
                connection.getInputStream()));

        System.out.println(urlString);

        return reader;
    }

And when server returns 503 – java throws Exception. But, how can I get text, that server return??

  • 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-06T02:43:33+00:00Added an answer on June 6, 2026 at 2:43 am

    Use getResponseCode() and getResponseMessage() methods of HttpURLConnection class.

    Invoke them after you have built the connection object but before you are getting stream from the connection.

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

Sidebar

Related Questions

Getting these errors in some java code http://tutorials.jenkov.com/java-multithreaded-servers/multithreaded-server.html Exception in thread Thread-0 java.lang.RuntimeException: Cannot
We are getting the error below calling c:\windows\syswow64\regsvr32.exe on Windows Server 2008 R2 x64.
The htaccess file below crashed the site with an internal server error (500). This
I got the Error message in Android below, it is send by PHP server
Is the below error looks same as from GenericErrorPage.htm? Server Error in '/' Application.
I get this error when calling my service: Server Error in '/' Application. --------------------------------------------------------------------------------
Running the following query in SQL Server Management Studio gives the error below. update
I have an app which was facing recurring server errors when on M/S datastore
I keep seeing errors in the Dev Server console log about the Datastore Admin
We have been facing Out of Memory errors in our App server for sometime.

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.