Meaningless Drivel is fun!*
The moose likes Tomcat and the fly likes basics of container and ports behaviour Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "basics of container and ports behaviour" Watch "basics of container and ports behaviour" New topic
Author

basics of container and ports behaviour

gopi nath
Greenhorn

Joined: Feb 02, 2008
Posts: 9
QUES1:can a web container listen to many ports?

QUES2:can many web containers listen to a single port?

QUES3: given the port number how do we find which tomcat web container listens to it.

QUES4:given the container (say tomcat_001),how do we find the ports to which it listens?

QUES5:Where are these ports physically present(i.e like...network card or.. etc?

ques6:I need some overview about webservers and containers(my knowledge in webservers or app server= 1/10).So please suggest me a good link to get some working knowledge or basic knowledge about servers!
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"mercury falls",
Please check your private messages regarding an important administrative matter.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
gopi nath
Greenhorn

Joined: Feb 02, 2008
Posts: 9
Hi ben.I have gone through the naming policy and i have changed the name!!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12755
    
    5
1. yes
2. one
3,4. Tomcat configuration file server.xml, look for "port="
5. a lot of operating system sits between hardware and Java port programming
6. start simple - a google search for "web server tutorial" turned up lots
Installing and running Tomcat as a local server will teach you lots.

Bill
gopi nath
Greenhorn

Joined: Feb 02, 2008
Posts: 9
Thanks yaar!!
is it "yes"or "no" for ques 2 and for ques 4 ...
if i have 40 container present inside a web server and how is it possible to open every server.xml file to find which container listens to a particular port(say port number=7193)!
gopi nath
Greenhorn

Joined: Feb 02, 2008
Posts: 9
ques 2 was posted wrongly!!
sorry
this is the right one..
can many web container listen to a single port??
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41033
    
  43
No.


Ping & DNS - my free Android networking tools app
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12755
    
    5
if i have 40 container present inside a web server and how is it possible to open every server.xml file to find which container listens to a particular port(say port number=7193)!


Tomcat uses a SINGLE server.xml file to configure the part of the container that listens for requests. There is only one "container" which can hold many "web applications."

Like my previous post said, I think you should start with the basics by installing Tomcat, running some examples, and studying how the various configuration files work instead of jumping to conclusions about non-existant problems.

Bill
gopi nath
Greenhorn

Joined: Feb 02, 2008
Posts: 9
---------------------------------------------------------------------------
Tomcat uses a SINGLE server.xml file to configure the part of the container that listens for requests. There is only one "container" which can hold many "web applications."

Like my previous post said, I think you should start with the basics by installing Tomcat, running some examples, and studying how the various configuration files work instead of jumping to conclusions about non-existant problems.
---------------------------------------------------------------------------
FROM TOMCAT DOCUMENTATION WHAT I CAME TO KNOW IS THAT,TOMCAT IS A WEB-CONTAINER.
CONTAINER PROVIDES EXECUTION ENVIRONMENT AND OTHER TAKE CARE OF SERVLET LIFECYCLE AND OTHER STUFF.
WEB-SERVER'S MAIN WORK IS TO HANDLE REQUEST AND RESPONSE,ETC.

IN MY WORKING APPLICATION I HAVE A WEB-SERVER WHICH CONTAINS 11 WEB CONTAINER AND AS YOU SAY EACH WEB CONTAINER HAS A SERVER.XML FILE AND HENCE 11 SERVER.XML ARE TOTALLY AVAILABLE.
NOW IF SUPPOSE MY BOSS ASK ME " HI GOPINATH,CAN YOU FIND ME WHICH ARE THE CONTAINERS WHICH LISTEN TO PORT XXXX ".IN THAT CASE,YOU NEED TO OPEN ALL THE 11 SERVER.XML FILES TO FIND THE CONTAINERS WHICH LISTEN TO THE GIVEN PORT XXXX.AM I RIGHT??!!!
MY DOUBT IS ,IS THERE ANY ALTERNATIVE TO THIS???
karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259
There are utilities which list the name of the process and the related port used. Please search for those. Else open all the server.xml and maintain proper documentation which will be useful in future.
[ May 15, 2008: Message edited by: karthi keyan ]

http://www.skillassert.com


Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Gopi,

Please be aware that typing with the caps-lock button down is the equivalent to yelling or shouting in a web forum and is considered rude. Many people, myself included, will not bother to read a question that is typed this way.

You can always go back and fix posts like this by clicking on the link in the post.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12755
    
    5
I HAVE A WEB-SERVER WHICH CONTAINS 11 WEB CONTAINER


If you have a single instance of Tomcat, you have a single container.
If you have 11 containers you must be running 11 instances of Tomcat.
Each instance of Tomcat must have its own unique port settings in its own server.xml or trouble will result.

Bill
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by William Brogden:

Each instance of Tomcat must have its own unique port settings in its own server.xml or trouble will result.


<fussy correction>
More of an addition than a correction.
...must have its own unique ip:port settings.
Multiple copies of Tomcat, or multiple connectors within a single instance of Tomcat can listen on the same port as long as they're configured to listen on different IP numbers.
</fussy correction>
gopi nath
Greenhorn

Joined: Feb 02, 2008
Posts: 9
sorryfor typing in caps .i do not know such meanings will exists..
-------------------------------------------------
<fussy correction>
More of an addition than a correction.
...must have its own unique ip:port settings.
Multiple copies of Tomcat, or multiple connectors within a single instance of Tomcat can listen on the same port as long as they're configured to listen on different IP numbers.
</fussy correction>
--------------------
we are disscussing about the case of same webserver(say: its ip=xxx.yyy.zzz.aaa)...
so where does the case comes of a different ip numbers?
Multiple copies of Tomcat, within a single instance of Tomcat!!
wat does it mean??? can we tell no of instance==no of containers which are started?
 
Consider Paul's rocket mass heater.
 
subject: basics of container and ports behaviour
 
Similar Threads
Does the webservers blocks some range of ports for its use?
port scanning
Making a port listen
How to close all the port allocated by tomcat after a doGet() request
can a server have more than one port?