You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sriram Narayanan <sr...@yahoo.com> on 2002/02/11 15:44:12 UTC

Problem when embedded Tomcat via Embedded -> Connector listens only on localhost.

Hello,

I am trying to write a UI for Tomcat, something similar to what Websphere provides.

I have written wrappers that are first configured with various attributes. Then, when the server needs to be assembled together and 
started, the wrappers use Embedded to build the parts, and the server starts fine.

The only problem here is, I am able to view pages only when I contact the server from the same host. When I contact the server from 
another host, I am not served any page.

However, when I execute embedded's main I am able to access web pages, servelets, jsps, etc from any computer on the network.

I have created a connector like this:

	HttpConnector connector = (HttpConnector)embedded.createConnector(null,8080,false);

and I add it to the embedded server via code which in effect does this:

	embedded.addConnector(connector);

The server starts up successfuly, and I when I access pages locally (servlets, JSPs, etc) everything works fine.
However when I access the same server from another system via the network, I get a "page cannot be displayed" in IE 5.

I've attached a log file that describes contains two requests. The unsuccessful request, coming from 192.168.1.213, followed by the 
successful request, coming from 192.168.2.219.

Here are my server settings:
Embedded as the server, contains the following:
Engine : defaultHost
Host: localhost
1 context called "test" which I am able to access via http://localhost:8080/test/
Connector created as above and added to the Embedded server

I am running all this code from within Visual Age for Java 4.0

Where is it that I am going wrong ?

Sriram