IntelliJ Java IDE
The moose likes I/O and Streams and the fly likes java.net.UnknownHostException Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "java.net.UnknownHostException" Watch "java.net.UnknownHostException" New topic
Author

java.net.UnknownHostException

Ken Pullin
Ranch Hand

Joined: Jan 29, 2001
Posts: 43
Hi - I have a servlet that tries to make a HttpURLConnection to a website outside of my domain. Basically we send some info to another website so that the website can put a Cookie on the user's machine and then redirect back to our website(we use this to brand our site when user's come through a portal). anyway, this works in our QA and stage environment but not in production. Our environment consists of Weblogic 5.1 and Netscape on Unix (Sun Solaris) machines. We added the url to the host file in the production environment, but everytime we try to connect(which we do first to make sure the other website is "up"), our code throws a UnknownHostException - any clues?
Jhun Hoon
Greenhorn

Joined: Nov 19, 2001
Posts: 28
What did you do to get the HttpURLConnection object for the site you want to access ? Using java.net.URL.openConnection() method ? How about trying to use IP address instead of hostnames ?
 
 
subject: java.net.UnknownHostException
 
Threads others viewed
wildcard for tomcat-users.xml users
java.net.UnknownHostException
sun app server 81. vs 8.2 for sun studio creator2
Project directory structure that facilitates all kinds of developer testing
Domain Authentication
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com