Paul Clapham wrote:Are there still people out there who think they have to type URLs? Just send them an e-mail containing the long and complicated URL and tell them to click on the link. And surely they know how to use the "Favorites" menu in their browser?
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Paul Clapham wrote:Are there still people out there who think they have to type URLs? Just send them an e-mail containing the long and complicated URL and tell them to click on the link. And surely they know how to use the "Favorites" menu in their browser?
Karthik Shiraly wrote:Assuming your tomcat /webapps directory looks like this:
All you need to do to make a request to "http://TestApp" resolve to webapp "TestApp.war" is to rename "TestApp.war" as "ROOT.war" and make Tomcat listen on port 80 by specifying it in server.xml HTTP connector element (http://tomcat.apache.org/tomcat-6.0-doc/config/http.html).
Any webapp named "ROOT.war" will not need the webapp name in URL.
It's not necessary to have a separate IP. Both domains "TestApp" and "TomcatServer" can point to the same IP as long as that IP is accessible to all users of your webapp.
If for some reason, you want to have separate IPs (for example, same NIC with multiple IPs), then Tomcat by default binds to all available IPs on port 80 - you don't have to do anything special.
The side effect of all this is that http://TomcatServer (without any webapp name) too will resolve to "ROOT.war", and "http://TestApp/ProdApp1" will resolve to "ProdApp1.war".
If that is not what you want, then one solution is to use separate "Virtual hosts" (http://tomcat.apache.org/tomcat-6.0-doc/config/host.html) for each domain.
The Virtual Host concept is for multi tenancy in a shared Tomcat instance. It allows multiple domain names to share the same IP, but resolve to different sets of webapps. Each Virtual Host can then have its own webapps directory.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
How do I get it to respond on a different IP from the one that is statically assigned to the single NIC? Do I need to do some sort of configuration to the NIC itself?
Karthik Shiraly wrote:
How do I get it to respond on a different IP from the one that is statically assigned to the single NIC? Do I need to do some sort of configuration to the NIC itself?
In your post, you've mentioned OS is Windows 2003. Assigning multiple IPs to the same NIC is possible in Windows too, from "Network connection properties > Internet Protocol Version 4 Properties > Advanced" dialog.
On a different note, it's not clear to me why you would need a dedicated IP address for this webapp. If the problem is only to have a friendly URL without any webapp name in it, then the "ROOT.war" name - optionally with virtual host configured - should solve the problem. What benefit will a dedicated IP address provide in this situation?
rubbery bacon. rubbery tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|