Thanks for the reply, David. Are you saying that I need to get rid of the sub-domains? i.e. I should use xyz.com/photos rather than photos.xyz.com? Can you please elaborate?
Thanks, Kristin On Mon, Feb 25, 2008 at 4:04 PM, david delbecq <[EMAIL PROTECTED]> wrote: > Since your 3 webapps need to share classes code, object instances and > session information, i don't see why you want to make 3 webapps instead > of just one. So my advise would be to make a single webapp. > Kristin Coles a écrit : > > I use Apache Tomcat (5.5.9) to host the website (xyz.com) along with a > > couple of sub-domains (photos.xyz.com and documents.xyz.com). You can > find > > the relevant portion of server.xml file below. > > > > Hosting the websites in this way has lead to two main headaches. > > 1. I cannot share my Java code between xyz.com, photos.xyz.com and > > documents.xyz.com: > > For example, if I have written a simple Java Bean Class and its deployed > in > > Tomcat/webapps/xyz/WEB-INF/classes, the Class is not available to > > photos.xyz.com and documents.xyz.com. The only way to make it available > to > > all three domains is deploying the Java Bean class in Tomcat/shared/lib > or > > Tomcat/common/lib directories. > > > > 2. Problems with session sharing across the domain (xyz.com) and its > > sub-domains: > > For example, when a user performs a search on xyz.com, I store the > search > > results in a Java Bean Object in the session. Lets say the user clicks > on > > one of the search results and ends up on a page at documents.xyz.com. > Here I > > won't have access to the Search Results Java Bean object, which I would > love > > to have. > > > > > > These two problems should be pretty common, right? I am wondering how > should > > I structure my application(s) to take care of the above two. Please > advise! > > > > Thank you, > > Kristin > > > > /* server.xml */ > > <Host name="xyz.com" appBase="webapps"> > > <Context path="" docbase="xyz"> > > </Context> > > </Host> > > > > <Host name="photos.xyz.com" appBase="webapps"> > > <Context path="" docbase="photos"> > > </Context> > > </Host> > > > > <Host name="documents.xyz.com" appBase="webapps"> > > <Context path="" docbase="documents"> > > </Context> > > </Host> > > > > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >