This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes Sockets and Internet Protocols and the fly likes Is it printed wrongly? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Is it printed wrongly?" Watch "Is it printed wrongly?" New topic
Author

Is it printed wrongly?

fang yuan
Greenhorn

Joined: Dec 19, 2007
Posts: 1
I'm puzzled while reading the book "Head First Servlets&JSP" on page 21,
when i encountered a sentence as follow:Using one server app per port,a server can have up to 65536 diferent server apps running( although it's
possible to run more than one app on the same port if the apps use different protocols).
If so,could i deploy one app using FTP protocol and another one using HTTP,both on port 80? Is it printed wrongly or do i make a mistake?
i think the last sentence should be:
although it's
possible to run more than one app on the same port if the apps use the same protocol).
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8876

It is possible to run more than one app on the same port at the same time.


Groovy
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8259

Originally posted by Pradip Bhat:
It is possible to run more than one app on the same port at the same time.


No it is not. I'm curious to know what they mean by stating that different protocols would make it OK. I suppose one could make a proxy app to bind to a particular port and forward requests according to the protocol, but the downstream apps would still need to bind to their own ports.
Submit your find to the errata.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8876

Sorry, it was a typo.

I had meant It is not possible to run more than one app on the same port at the same time.
[ December 19, 2007: Message edited by: Pradip Bhat ]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Is it printed wrongly?
 
Similar Threads
Doubt on port in HFSJ
a question about port
could anyone please answer this question.....
Doubt on Protocol & Port number
How to enable SSL for only one site in Tomcat