Problems with Tomcat. Connection refused:connect
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Lucio_Angulo
Posted On:   Monday, December 16, 2002 12:00 PM

Hi¡ we want to communicate an applet with a servlet. We are using Tomcat with IIS. We have put the html file in webapps/, next to the *.jar files and the key (for signing the applet). The servlet files are in webapps/WEB-INF/classes/. The problem is that we try to connect with the following URL: url=new URL("http://localhost:8080/servlet/ServletDatos"); We think the servlet is found, but appears the following error when the program try to execute servletConnection.getOutputStream(): java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSoc   More>>

Hi¡

we want to communicate an applet with a servlet. We are using Tomcat with IIS. We have put the html file in webapps/, next to the *.jar files and the key (for signing the applet). The servlet files are in webapps/WEB-INF/classes/. The problem is that we try to connect with the following URL:

			
url=new URL("http://localhost:8080/servlet/ServletDatos");

We think the servlet is found, but appears the following error when the program try to execute servletConnection.getOutputStream():

			

java.net.ConnectException: Connection refused: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)

at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)

at java.net.Socket.connect(Socket.java:425)

at java.net.Socket.connect(Socket.java:375)

at sun.net.NetworkClient.doConnect(NetworkClient.java:139)

at sun.plugin.net.protocol.http.HttpClient.doConnect(HttpClient.java:95)

at sun.net.www.http.HttpClient.openServer(HttpClient.java:366)

at sun.net.www.http.HttpClient.openServer(HttpClient.java:582)

at sun.net.www.http.HttpClient. (HttpClient.java:292)

at sun.net.www.http.HttpClient. (HttpClient.java:253)

at sun.plugin.net.protocol.http.HttpClient. (HttpClient.java:41)

at sun.plugin.net.protocol.http.HttpClient.New(HttpClient.java:68)

at sun.plugin.net.protocol.http.HttpURLConnection.privBlock(HttpURLConnection.java:113)

at sun.plugin.net.protocol.http.HttpURLConnection$PrivilegedBlockAction.run(HttpURLConnection.java:430)

at java.security.AccessController.doPrivileged(Native Method)

at sun.plugin.net.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:157)

at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:510)

at EnvioDatos.run(EnvioDatos.java:106)

at DemonstrationProgram.actionPerformed(DemonstrationProgram.java:218)

at java.awt.Button.processActionEvent(Button.java:381)

at java.awt.Button.processEvent(Button.java:350)

at java.awt.Component.dispatchEventImpl(Component.java:3526)

at java.awt.Component.dispatchEvent(Component.java:3367)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)

..........

We haven't configured any file from Tomcat (server.xml,web.xml..), and we don't know if it is necessary. Examples from Tomcat work well.

Are the servlets in the correct place?
Are the applet in the correct place?
We have to configure some files (server.xml, web.xml..)?

   <<Less
About | Sitemap | Contact