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 have a question about using different hostnames in Tomcat. Currently I have a JSP/Servlet application that works pretty well with localhost as the hostname.
However, it seems that my application works only with localhost and not the hostname of my computer. For example if I write:
I can see the default Apache Tomcat page. However, if I use my computer hostname, which is DSTI-72001714, instead of localhost, that is,
it doesn't work and the very same page cannot be found. I don't really understand, because this hostname is valid and I can ping it from any computer in our
enterprise (including the localhost), therefore principally there is no DNS problem.
Any idea? What may I have forgotten during Apache Tomcat configuration causing this problem?
You need to update your tomcat server.xml file if your going to use v.hosts. Basically you have to tell tomcat that you want http://DSTI-72001714 to point to the localhost. You can do this by modifying the following lines in your server.xml:
You can also add logging by adding this code between the host tags:
Hope this helps.
Joined: Apr 12, 2009
Thank you very much both of you for your attention to my problem. Finally It had nothing to do with tomcat configuration. The problem was that I had not
activated the "Web Proxy Auto-Discovery" in firefox. In our enterprise we have two proxy servers, one is used for the internet and the second one for
the hostname resolution of the enterprise workstations. I had set manually only the internet proxy, as a result the browser could not resolve the hostname.
But after activating "Web Proxy Auto-Discovery", both proxies became available, and the application worked pretty well also with the specified hostname.
Once again, thanks for your answers.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Why my application on Tomcat works only with localhost?