File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes Connect any url using proxy settings in jboss 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Connect any url using proxy settings in jboss 6.0 " Watch "Connect any url using proxy settings in jboss 6.0 " New topic
Author

Connect any url using proxy settings in jboss 6.0

Brijesha Murali Sharma
Greenhorn

Joined: May 31, 2011
Posts: 2
Hi All,

I have a web project and inside this project I am trying to connect a URL using proxy server.
I do not want to achieve proxy settings through java code. i want server side proxy configuration that i can connect with any URL mentioned in my web project.

I have done following proxy setting in JBOSS Server.xml file:
<Connector protocol="HTTP/1.1" port="${jboss.web.http.port}" proxyName="192.168.4.208" proxyPort="3128"/>

and the code for connectivity is
"try {
InetAddress address = InetAddress.getByName("www.google.com");
boolean reachable = address.isReachable(10000);
System.out.println("Is host reachable? " + reachable);
}catch (Exception ex) {
System.out.println("ex:: " + ex);
}
"

When i run this application, i am getting the following error:

java.net.UnknownHostException: www.google.com

any idea, how i can connect the url using proxy settings in jboss 6.0 server..

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connect any url using proxy settings in jboss 6.0
 
Similar Threads
Working with Internet URL from Eclipse
Http Request through Proxy Server
Working with Internet URL through Proxy from Java Code
Generated Stub and Proxy Settings !!
Error when calling a web service in Java Client