wood burning stoves
The moose likes General Computing and the fly likes Not able to connect to a host URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Not able to connect to a host URL " Watch "Not able to connect to a host URL " New topic

Not able to connect to a host URL

Deepshan Shetty
Ranch Hand

Joined: May 28, 2012
Posts: 30

I'm trying to connect to a URL (https://infinity.bank.co.in/AWAY) through my jsp.
But i get an exception like
exception in urlConnect-->java.net.UnknownHostException: infinity.bank.co.in

My code to connect is as follows

where VerifyResponseURL = https://infinity.bank.co.in/AWAY
and the URL is correct

Can i get a solution to this?

S V Shetty
Sumit Patil
Ranch Hand

Joined: May 25, 2009
Posts: 296

Are you sure the URL is correct?
For me, this URL is not opening up in Firefox.

Thanks & Regards, Sumeet
SCJP 1.4, SCWCD 5, LinkedIn Profile
Swastik Dey

Joined: Jan 08, 2009
Posts: 1510

Does not work from chrome too.

Deepshan Shetty
Ranch Hand

Joined: May 28, 2012
Posts: 30

This is the URL
John Jai

Joined: May 31, 2011
Posts: 1776
If you are using a proxy to connect, set the proxy settings while opening the connection like below.

Deepshan Shetty
Ranch Hand

Joined: May 28, 2012
Posts: 30
But I'm not using a a proxy :(

And i don have any IP address as such !
BalaMurali dhar
Ranch Hand

Joined: Apr 14, 2012
Posts: 60
Are you sure the URL is working? For me this is not Working
Deepshan Shetty
Ranch Hand

Joined: May 28, 2012
Posts: 30

Get the following exception

exception in urlConnect-->java.net.UnknownHostException: infinity.icicibank.co.in
java.net.UnknownHostException: infinity.icicibank.co.in
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:564)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1014)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)

Any idea why is this??

Can it happen if the URL is incomplete??
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Not able to connect to a host URL
It's not a secret anymore!