Class and Object sharing across domain and its sub-domains

2008-02-25 Thread Kristin Coles
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


Re: Class and Object sharing across domain and its sub-domains

2008-02-25 Thread Kristin Coles
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]




How to disable Session Persistence in Tomcat 5.5.9

2007-11-14 Thread Kristin Coles
Hi guys,

I know that there have been quite a few threads on this list that
relate to the same subject. I have tried the following advice but none
helped.

# Tomcat\conf\context.xml
Context
WatchedResourceWEB-INF/web.xml/WatchedResource
Manager pathname= /
/Context

# Tomcat\conf\server.xml (version 1)
Host name=cas appBase=webapps\cas
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
expireSessionsOnShutdown=true
Context path= docBase=
Manager 
className=org.apache.catalina.session.PersistentManager
debug=0
saveOnRestart=false
maxActiveSessions=-1
minIdleSwap=-1
maxIdleSwap=-1
maxIdleBackup=-1
Store 
className=org.apache.catalina.session.FileStore
directory=logs/sessions /
 /Manager
 /Context
/Host 

# Tomcat\conf\server.xml (version 2)
Host name=cas appBase=webapps\cas
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
expireSessionsOnShutdown=true
Context path= docBase=
Manager 
className=org.apache.catalina.session.StandardManager
debug=0 pathname =
 /Manager
 /Context
/Host 

I have deployed and configured CAS (Central Authentication Service for
Single Sign-On) as as web application on Tomcat. However, while using
CAS, I've found that the user who was logged in before the Tomcat
restart, is still logged in after the Tomcat restart.

Can anyone here please help resolve this issue!!!

Thank you,
Kristin

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]