This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I had our network team create a DNS name for my Business Objects Application. The name of the DNS name is "TruPoint". When a user types http://trupoint.montefiore.org I want them to be directed to our "BO" site. The IP address is correct on the DNS server (it is pointing to my Tomcat server). However when a user enters http://trupoint.montefiore.org I get "page not found". The Network Engineering Team told me I have to configure Tomcat to respond to the http://trupoint.montefiore.org equest. Can someone tell me where to make that configuration change? I am new to Tomcat so any help you may give is much appreciated. :-)
What does that mean - is it "TruPoint" that is mapped via DNS, or "trupoint.montefiore.org"? Since "trupoint.montefiore.org" isn't mapped on the public DNS, I assume the DNS in question is part of your local network - in which case it would indeed be simpler just to map "TruPoint" instead of the entire domain name. Makes it shorter for people to remember and type. This should get you going.
This is on our Intranet NOT the Internet. Trupoint is the DNS name created on our internal DNS servers. The URL trupoint.montefiore.org is the same as http://trupoint. The "montefiore.org" is just the name of our domain. The link you provided did not resolve my issue. Atleast after I did what it said. Perhaps I am doing something wrong. What is strange is in IIS I would not have to do anyting. In IE or any other browser the user just types http://trupoint or http://trupoint.montefiore.org and it would take them to my BO site.
Thanks again for your help.
Joined: Mar 22, 2005
Atleast after I did what it said.
Well, what exactly did you do? (And just to make sure: you did restart Tomcat after making the changes, right?)
Also, what is the result of typing "nslookup trupoint" on your command line?
Joined: Jun 13, 2013
This is where I assume I got it wrong...
<Engine name="Catalina" defaultHost="trupoint.montefiore.org"></Engine>
DNS is like a telephone book. You look up a name, it returns a number.
The actual business of running communications over a tcp/ip network (internet OR intranet) is done strictly via IP address. The IP address is that gets a particular message to a particular machine. How you obtain that IP address, whether it's via DNS, a "hosts" file, hand-coded, or any of several other popular lookup mechanisms, is immaterial.
So when you get a "404" error, that simply means that your address has been routed to a server that could accept the request, but could not resolve the resource path. Possible causes include:
1. It's the wrong machine
2. It's the wrong server within the machine (NOTE: DNS does not resolve port numbers, only IP addresses. So if you ask for HTTP and don't supply a port number override, it goes to port 80). Server selection is based on port number, so if Apache httpd is on port 80 and Tomcat is on port 8080, failure to provide the "8080" will result in the request being routed to Apache httpd.
3. The server cannot decode the URL properly. For example, a Tomcat server can run multiple webapps, each with its own unique context path component of the URL. Wrong context path sends the URL to the wrong webapp.
4. The webapp cannot decode the URL properly. Tomcat will further break down a URL so that after it knows which webapp to route a URL to, it can then select which servlet/JSP to route the URL request to. If nothing resolves, Tomcat returns a "404" page. Also, a servlet or JSP can itself respond with a "404" if that's what it was programmed to to for input it doesn't know how to handle.
Normally you do not configure domain name addresses in tomcat's server.xml file. You would only typically do this when serving multiple virtual hosts. For a single virtual host, the default "Catalina localhost" is sufficient.
Customer surveys are for companies who didn't pay proper attention to begin with.