• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WebSite Mapping

 
Patrick McDonogh
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic