Results 1 to 2 of 2
  1. #1
    sherlock is offline Member
    Join Date
    Jul 2010
    Posts
    1
    Rep Power
    0

    Default Response code from URL

    I was using a URLConnection to go to a URL which essentially submitted a request onto a server for analysis of my query , and then I get a reference number from that URL to go to another one for the results.

    For whatever reason at random times I get this error

    java.io.IOException: Server returned HTTP response code: 502 for URL: http://www.....

    I just wanted advice on whether bypassing the entire run of the program by using HttpURLConnection and getting the response code was the only and ideal solution to prevent this.

  2. #2
    Spike_CT is offline Member
    Join Date
    Jan 2010
    Posts
    14
    Rep Power
    0

    Default

    Wat I found on the wiki is that response code 502 indicates a bad gateway.


    http://en.wikipedia.org/wiki/502_error#5xx_Server_Error


    502 Bad Gateway
    The server was acting as a gateway or proxy and received an invalid response from the upstream server.

Similar Threads

  1. Server returned HTTP response code: 500.. i need help
    By hardc0d3r in forum Java Servlet
    Replies: 9
    Last Post: 03-12-2012, 08:08 PM
  2. Server returned HTTP response code: 500
    By fuliangQ in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 04-09-2009, 03:55 AM
  3. Try catch response
    By Reiyn in forum New To Java
    Replies: 1
    Last Post: 03-30-2009, 08:30 PM
  4. java.io.Exception: Server returned HTTP response code: 403
    By navishkumarb in forum Advanced Java
    Replies: 1
    Last Post: 01-05-2008, 01:33 PM
  5. Server returned HTTP response code: 500
    By Heather in forum Java Servlet
    Replies: 1
    Last Post: 07-09-2007, 04:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •