Hi,

 I m trying to open a URLConnection with an external resource (xyz.com) within
the servlet code but it is providing me the following exception.

java.net.ConnectException: Connection refused: no further information
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
        at java.net.Socket.<init>(Socket.java:273)
        at java.net.Socket.<init>(Socket.java:100)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:50)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:331)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:517)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:277)
        at sun.net.www.http.HttpClient.New(HttpClient.java:289)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:379)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:472)
        at java.net.URL.openStream(URL.java:798)
        at examples.jsp.cal.Calurl_jsp_2._jspService(Calurl_jsp_2.java:78)
        at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
        at com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.j
ava:88)
        at com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
        at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
        at com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155
)
        at com.sun.web.core.Context.handleRequest(Context.java:414)
        at com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)
HANDLER THREAD PROBLEM: java.io.IOException: Socket Closed
java.io.IOException: Socket Closed
        at java.net.PlainSocketImpl.getInputStream(PlainSocketImpl.java:421)
        at java.net.Socket$1.run(Socket.java:335)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.Socket.getInputStream(Socket.java:332)
        at com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:161)

Can anybody help me

shahzad

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to