*
The moose likes Servlets and the fly likes multiple subdomains on the same context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "multiple subdomains on the same context" Watch "multiple subdomains on the same context" New topic
Author

multiple subdomains on the same context

Daniil Sosonkin
Ranch Hand

Joined: Jan 15, 2004
Posts: 76
Hi,

I didn't find a forum for Tomcat so I'll ask here, maybe someone will be able to help.

I have a website (www.site.com) and that website has a forum. But since I want to have nice looking easy to remember URLs, the forum is located at forum.site.com

Users login to www.site.com and the forum and site use the same users and obviously I dont want to have users login twice to post on forum. How can I configure tomcat so that servlets/JSPs see seession from www.site.com?

Its all on vitual domains right now (apache->mod_jk->tomcat).

Any help is appreciated,

Daniil
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Daniil Sosonkin:
I didn't find a forum for Tomcat so I'll ask here, maybe someone will be able to help.


It's under products on the front page of the forum.
http://www.coderanch.com/forums/f-56/Tomcat


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You can set up multiple virtual hosts in Tomcat
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html

What I'm not sure of is how using Apache as a front end affects this.
I use Tomcat as a standalone.
Daniil Sosonkin
Ranch Hand

Joined: Jan 15, 2004
Posts: 76
Thanx,

But is seems that there's no way to implement this. Since session isn't shared across multiple virtual hosts I can't use multiple Host. I can't use Alias inside a Host since there's no way to tell Tomcat to look into different dir for forum files.

Oh well
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: multiple subdomains on the same context