This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Websphere and the fly likes HTTP Url Connection Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Websphere
Bookmark "HTTP Url Connection Error" Watch "HTTP Url Connection Error" New topic
Author

HTTP Url Connection Error

Pankaj Singh
Greenhorn

Joined: May 19, 2003
Posts: 2
I have an application deployed on Websphere which opens up HTTP URL connection to different other app server.
It takes URL list as a parameter , appends some parameter and invokes the connect method.

Something like:
final URL url = new URL(urlStr.toString());
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.connect();
final int returnCode = urlConnection.getResponseCode();

We have two data center on Production and this works on one . i.e the return code comes back as 200 whereas it fails on other data centers (returns error code as 503,404,406 etc) for the same set of URL's.

Also if i were to take those URL and invoke them directly from teh browser it works all the time.

I'm ruling out this to be a code issue otherwise it shodln't be working on one data center.

I'm wondering is there a Websphere App Server conatiner property which will only permit URL's coming from a known source ?

Any other thoughts as to what should be checked as far as configuration goes ?
 
GeeCON Prague 2014
 
subject: HTTP Url Connection Error