• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

WebSite Mapping

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am very confused about how to do something.

I have a server which has tomcat installed and have written a Struts web site that i would like to make viewable to the world over the web.

I have a domain name and have changed the name servers to point at my servers IP address which is running tomcat on http port 80(Default). For instance say the name is mydomain.com if someone goes to www.mydomain.com they then see the tomcat welcome page just the same way is if i go to http://localhost:80 on the server running tomcat.

So from this i can see that at least the www.mydomain.com is at least mapping to the correct server.

What i want to know is how to map www.mydomain.com to the actual struts web site running on tomcat, as if on the server i went to http://localhost:80/mydomain

Does anyone know how tomcat maps domains to applications running on tomcat?

Thankyou for the help.

Patrick
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want the web app to be served without a context path (more accurately, with a context path of "") you'll need to replace the root webapp that Tomcat provides with your own.
[ August 04, 2007: Message edited by: Bear Bibeault ]
 
Patrick McDonogh
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK i see.

But what if you wanted to host more than one site on the tomcat server.

So say one uses www.smart.com and the other is www.silly.com

Is there no way for tomcat to map the domain used to a site it is running?

If tomcat cant do this is there some way to map the domains used.

Cheers,

Patrick
 
Bear Bibeault
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, tomcat can be confugred for different hosts. See the tomcat docs for <host> configuration.
 
Patrick McDonogh
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankyou for the reply this has definatelly pointed me in the right direction.

Take care and have a good day.
 
You would be much easier to understand if you took that bucket off of your head. And that goes for the tiny ad too!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic