This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm having trouble communicating with Tomcat via my browser.
I am using a dedicated server provided by a web host. They installed Apache 2.0, Tomcat 4.somethingorother, (can find out the exact version if anyone needs to know), and J2sdk1,4,2_05. Tomcat is supposedly running under Apache. The web host uses port 8009 as the default for tomcat.
I turned on Tomcat from the command line and verified that it was listening to port 8009 by listing the open ports. I then restarted Apache. Supposedly, you are supposed to be able to verify that Tomcat is working by using your browser and typing in http://xxx.xxx.xxx.xxx:8009/, (where XXX.XXX.XXX.XXX is my IP address - my domain name is not yet on this server) whereupon you are supposed to get the Tomcat documentation homepage.
Unfortunately, when I use the above url, I get an error messazge saying "The connection was refused when attempting to contact XXX.XXX.XXX.XXX:8009"
Does anyone know why this might be happening? Might it be some sort of security restriction somewhere? If so where might I look for it? Do I have to use a different URL to access Tomcat when it is running under Apache? A different port?? One source stated that you had to give permission to access Tomcat from a browser in the server.xml file, but that only works when its running as a standalone (and so far I have been unable to find anything telling what I have to type in there to give it permission). Also, what do I do when I want to run a servlet? I tried to access a sample Helloworld servlet in the Tomcat directory but got the same connection refusal error.
As usual the webhost's tech support was of no help at all. Any help would be greatly appreciated.
Here's what's in the server.xml file, minus the comments. There are only two references to ports. The first line refers to port 8005, I don't know what its doing. The forth line deals with port 8009. Is it saying that 8009 is for communications with Apache? If so, do I have to put in a similar statement telling Tomcat to use 8080 for browser access to servlets? Or should I be going through Apache somehow??
You're not going to be able to hit the AJP connector directly. AJP is a pipe between Tomcat and Apache. If you don't see a connector with port 8080 in the server.xml file, then your hosting company has probably disabled it.
Try hitting a hello world JSP without specifying a port number: <%="hello, world"%>
Didn't your hosting company provide any documentation?
Joined: May 31, 2005
http://xxx.xxx.xxx.xxx:8080 doesn't work. Port 8080 is not listed as being listened to when I use "netstat" to get the list. Prior to submitting my first question here, I *did* have to turn Tomcat on, then I restarted Apache (the web host installed it, but just didn't turn it on, apparently). Before I did that, port 8009 was not listed, after I did that, port 8009 is listed as being listened to, presumably Tomcat is now using it to listen for Apache.
Anyway, the server.xml file (see above) does not have anything like a <Connector port="8080" ....> statement. Do I need to type one in, and if so, what is the exact syntax to assign it as the port for communicating with a browser?
As for documentation from the Webhost - almost nonexistent. It's a matter of calling tech support and staying on hold until someone gets around to answering, then you have an approximately 50/50 chance of getting someone who knows what they're talking about. You know the drill. I find forums like this much more helpful - a bit slower, but so far I have plenty of time.
Havn't tried getting the "helloworld" screen directly yet.