• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

How to assing IP address to web application?

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure if I correctly formulated the subject of this post.
I need to configure my Tomcat so that it listens to IP addresses and for specific IP address opens specific web application.
For example.
if users types aaa.aaa.aaa.aaa( dummy IP address ) tomcat opens web application "a". And if user requests http://bbb.bbb.bbb.bbb Tomcat opens web application bbb.
Please help me to find how to do this. any URL or related forum message would be helpful!
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can specifydifferent context for different web application in server.xml of Tomcat.
 
Sergey Kargopolov
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for your response!
Do you have an example how to do it?
or may be you can give me an URL where it is explained further?
 
Sergey Kargopolov
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
looking for a solution I posted the same message in few other forums. And I cannot believe that nobody knows how to solve it.
Some say that I need to create an additional virtual host.But I cannot see how does it solve the problem? are not virtual hosts local to my machine?
I have tried thought and could not create even one! jakarta-tomcat-5.0.16 does not even start up if I add one. I think I am doing it correctly because I used to do it in earlier versions. or did it change?
I could not find a good tutorial on how to configure Virtual hosts in jakarta-tomcat-5.0.16. Anybody can help me?
Thank you!
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As I recall, virtual hosts depend on the host name the request is directed to, not the IP address the request is coming from.
If all you want to do is switch "web applications" based on the IP address, seems to me you could do that by an initial Filter that looks at the IP address and then decides what to do with the request. However I have never tried this.
It is an interesting problem - you may have to get into the guts of Tomcat to solve it.
Bill
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic