Click to See Complete Forum and Search --> : Tomcat - Setting up a website


amacfarl
09-23-2003, 05:44 PM
Folks,

I am a java old hat, but a Tomcat newbie.

I have successfully install Tomcat and the relevant bits and pieces. When loading the following page in my browser http://localhost:8080/ I get the correct page showing. In addition, I can access all my deployed applications through http://localhost:8080/deployApp1...

The problem that I am having is accessing this web page from another pc. I am aware that localhost is not the way to go, so I have tried two things:

1) accessing it through http://<my ip address>

2) accessing it through http://temp_domain

The temp domain is a service from dyndns.org where it provides the functionality to create a temporary domain to be directed to a dynamic ip address. The dynamic ip address is updated through a program on my pc.

So in conclusion... what am I missing to make my web pages/ web apps viewable from other pcs??????

Is it security settings?

Please help

Thanks
Angus

Khalid Ali
09-23-2003, 08:10 PM
http://yourIpAddress:8080/Context/URL.html

should work...

amacfarl
09-24-2003, 02:57 AM
Khalid,
Thanks for taking the time to reply to my email. I have a few questions.

Why do I need to mention the port number in the URL?

What do I have to change so the port number is not needed in the URL?

As said in my previous mail, I am using a service that allows me to link a static domain to a dynamic ip address. This is now working (http://angus.meftp:8080) but I need the port still

Thanks

Angus

Khalid Ali
09-24-2003, 08:46 AM
HI Angus,

Below are the steps you need to get rid of Tocats default HTTP service port,
You should know that Bydefault an HTTP service prt is 80,and its not reuired to append to the url,the webserver already knows about it.

1. Go to the tomcats installation folder
typically on windows machine it will be
DiskDrive/tomcatfolder

on my win2k here is the path

C:\tomcat4

2. Then go to the conf folder
on my machine its like

C:\tomcat4\conf

3. In the conf directory there is a file named
"server.xml"

make sure to make a copy of this before you try to play with it.

4.Open the server.xml file in any suiteable text editor

locate this line of comments
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->

Righte below this line of comment
locate this line of XML tags and attributes

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8080" minProcessors="5" maxProcessors="75".......

change the port number(the text in bold above) to 80

port="80"

make sure 80 is enclosed with in the qoutes.

Save the file and restart the server...

amacfarl
09-24-2003, 01:05 PM
Thanks - You are a star!

It worked.

Khalid Ali
09-24-2003, 02:58 PM
glad to be of help..:)