wood burning stoves 2.0*
The moose likes Tomcat and the fly likes access tomcat on LAN Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "access tomcat on LAN" Watch "access tomcat on LAN" New topic
Author

access tomcat on LAN

Priya Bindra
Ranch Hand

Joined: Sep 22, 2009
Posts: 51
Hi All,

This is a very silly question, but please help me asap.

I have a LAN of 5 computers. One has tomcat 5.5 installed on it and my JSP webapp deployed on this tomcat. I can access this app from localhost, i.e. the same machine on which tomcat is installed. But I want to use this machine as a central server for other 4 machines. How can i access my webapp remotely over lan?

I tried the following:
http://ipaddress:8080/myapp
http://computername:8080/myapp

i also tried adding the server machine's ip addr with its netbios name in hosts and lmhosts file on all the other 4 systems. NOTHING WORKS.

Please guide ASAP.
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

Can you ping it from other machines? If no there might be some problem in network, if yes try to telnet using the following command

telnet ipaddress 8080

if it does not work, some firewall might be blocking port 8080


Swastik
Priya Bindra
Ranch Hand

Joined: Sep 22, 2009
Posts: 51
yes i can ping the ip from other machines, but browser does not give access to tomcat homepage or my webapp
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

Can you telnet the machine on port 8080?
Priya Bindra
Ranch Hand

Joined: Sep 22, 2009
Posts: 51
i tried:
telnet 192.168.1.15 8080

this is server's ip. cudbt connect
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

There seems to be some firewall blocking that particular port. So there can be two possible solutions, either you have to remove the firewall settings or you have to change the port number of tomcat.
Priya Bindra
Ranch Hand

Joined: Sep 22, 2009
Posts: 51
i tried to telnet without port no, and with arbid port no such as 36000. i still cudnt connect. is there any point changing port for tomcat till i can successfully telnet the server?
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

As far as i know for telnet some service needs to run, if you are not giving any port means you are hitting the default telnet port 23 so in that case the telnet server needs to run, and if you are using some arbitrary port, in that case some service needs to run on that port. So nothing wrong in changing the tomcat port and test it once.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16158
    
  21

Priya, please keep the abbreviations to a minimum. A lot of people here aren't fluent in English, and when abbreviations are concerned, even people fluent in English may not be familiar with dialectical abbreviations. Plus, I think you misspelled one, which made it even more cryptic.

One of the great things about the Internet is that most of the primary protocols are text-based, which means that for testing purposes, you can converse with them via telnet. The reason that text was used was partly for that very reason, and partly because in the early days, a lot of different brands of computers were talking to each other. Some of them were DEC machines, which are binary bytewise-discontinuous in their RAM organization, and used ASCII, and some of them were IBM mainframes, which are bytewise-continuous and EBCDIC. So 7-bit text was the common denominator.

You are correct. As long as you get a "connection refused" when attempting to telnet to port 8080 on your Tomcat server, there's no point in playing with Tomcat. Evidently there's a firewall between client and server, and overall it's better to open up port 8080 in that firewall. If you were to switch Tomcat to port 80, it would have to run as a root process on most server OS's, you might find port 80 was already being used by some other process such as Apache or IIS, and it's even possible that port 80 was firewalled as well.


Customer surveys are for companies who didn't pay proper attention to begin with.
Priya Bindra
Ranch Hand

Joined: Sep 22, 2009
Posts: 51
Swastik Dey wrote:As far as i know for telnet some service needs to run, if you are not giving any port means you are hitting the default telnet port 23 so in that case the telnet server needs to run, and if you are using some arbitrary port, in that case some service needs to run on that port. So nothing wrong in changing the tomcat port and test it once.


tried changing port 8080 to 2020 in server.xml on tomcat. restarted it. telnet didnt work. please help solve this problem or i wudnt be able to set up a development environment for my team.
Priya Bindra
Ranch Hand

Joined: Sep 22, 2009
Posts: 51
thanks all. i did it finally. i used microsoft help to unblock tomcat port in windows firewall. now it works.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: access tomcat on LAN