People can also use localhost:8080 directly in their applet to use servlet on Tomcat, so why we still need to so be troublesome to load and mod in Apache, configure Httpd.conf and use connector? Or just want to make the webaddress look beautiful?
Yeah, I know web server default is 80 port, Tomcat default is 8080, Tomcat can be changed to 80 cos Tomcate can be webserver and application server.
I just think when I decide to use Apache as Web server on 80, Tomcat as application server to support servlet, I can use Tomcat to support servlet for Apache server without configuring the connector, just use localhost:8080 or X.X.X.X:8080 if I don't think it is troouble, so I don't need to load the JK or Webapp module into httpd.conf. I don't need to configure the server.xml.
I wouldn't count on that. What if a firewall or router blocks 8080 specifically? Or only lets in 80, 23, and other well-known ports.
and also, it can't be "localhost", but I assume you're just using that as short-hand.
Applets are requested from the client, not the web server.
And while you *could* produce a mixed application that has parts *.html and parts /servlet and *.jsp pages, why would you ever want to keep track of remembering whether or not you had to put :8080 or not? That's what a connector is *for* !
Port 80 is best, because unless you explicitly say otherwise, that's the one people's web browsers normally hit.
Whether you bring up Tomcat directly on port 80, or pipe it from an Apache (or other server) that's on port 80 depends on your needs and preferences, and, as mentioned, pros and cons have been discussed in depth here more than once.
Firewalls are another incentive to use port 80, though 8000-series ports are not blocked very frequently, since ports such as 8080 and 8008 are very commonly used as secondary service ports.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
Did you miss me? Did you miss this tiny ad?
SKIP - a book about connecting industrious people with elderly land owners