Re: context sharing problems
On Thu, Sep 30, 2004 at 03:58:55PM +0100, Michael Cornell wrote: : I am trying to share the same class files (and libraries) between two : different web-apps one running in ROOT/ and one is admin/ I won't repeat what everyone else has said -- because that's all great advice -- but also consider this: change your build/deployment processes such that each app gets its own, separate copy of the needed JARs. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: context sharing problems
I think you should evaluate how your app is designed. If you need to communicate cross context/processes you should consider using something like JMS to give you good isolation. Today you may want to have everything on a single box, tomorrow you might want other servers. Another option to consider is to change the need for a singleton type of class or store some info in a database. Dov Rosenberg On 9/30/04 1:22 PM, "Michael Cornell" <[EMAIL PROTECTED]> wrote: > Well, I could do (and this actually works) but the problem then is that the > web-apps are actually started up separately (in separate memory spaces) and > the 'admin' one cannot access the singleton in the 'ROOT' one that has been > initialised with some values.. > > I need some sort of context settings that point the classpath (vm ??) to > the same place > > Any ideas?? > > -Original Message- > From: Dov Rosenberg [mailto:[EMAIL PROTECTED] > Sent: 30 September 2004 18:10 > To: Tomcat Users List > Subject: Re: context sharing problems > > Why don't you put your shared classes into $CATALINA_HOME/shared/classes. > Then all of your web apps can see and use them > > > > -- > Dov Rosenberg > Conviveon Corporation > http://www.conviveon.com > > On 9/30/04 10:58 AM, "Michael Cornell" <[EMAIL PROTECTED]> wrote: > >> >> Hi, >> >> I am trying to share the same class files (and libraries) between two >> different web-apps one running in ROOT/ and one is admin/ >> >> Basically, I want the first one to run from the default context ie >> http://www.x.com/ >> And the second web-app to run as http://www.x.com/admin >> >> However, all of the classes for both web-apps are situated in the first > one >> (ROOT). >> >> This may seem a strange way of doing things, but I need to reflect the >> changes made in admin (basically a collection of jsps etc) in ROOT (a >> series of filters etc). I have actually got this to work using a tomcat >> plugin in eclipse because of the way eclipse shares libraries and > classpaths >> >> Does anyone know how I could do this for a standalone tomcat (running in >> windows)??? >> >> Just to clarify: >> >> Web-apps\ >> ROOT\ >> WEB-INF\ >> Classes\ >> >> My\package\name\MyFilter.class >> >> My\package\name\StrutsAction.class >> >> My\package\name\ApplicationResources.properties >> >> My\package\name\MySingletonIIWantTochangeViaTheGuiRealTime.class >> Admin\ >> WEB-INF\ >> Web\index.jsp >> >> >> >> >> >> >> >> Thanks for your help >> M >> >> >> >> --- >> Outgoing mail is certified Virus Free. >> Checked by AVG anti-virus system (http://www.grisoft.com). >> Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004 > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004 > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004 > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Dov Rosenberg Conviveon Corporation 370 Centerpointe Circle, suite 1178 Altamonte Springs, FL 32701 http://www.conviveon.com [EMAIL PROTECTED] AOL IM: dovrosenberg (407) 339-1177 x102 (407) 339-6704 (fax) (800) 475-9890 (407) 310-8316 (cell) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: context sharing problems
Hi, Then put the singleton in the shared repository, not in ROOT. In general, what you're trying to do is inadvisable and against the spirit of the Servlet Specification: web applications are supposed to be self-contained. Features like a shared classloader repository are not mandated by the Spec and are a convenience-type feature with different levels of support and portability across containers. Consider alternative approaches to inter-webapp communication, such as over the network, via shared storage (filesystem or DB), or via a messaging platform such as JMS. Yoav Shapira Millennium Research Informatics >-Original Message- >From: Michael Cornell [mailto:[EMAIL PROTECTED] >Sent: Thursday, September 30, 2004 1:22 PM >To: Tomcat Users List >Subject: RE: context sharing problems > >Well, I could do (and this actually works) but the problem then is that the >web-apps are actually started up separately (in separate memory spaces) and >the 'admin' one cannot access the singleton in the 'ROOT' one that has been >initialised with some values.. > >I need some sort of context settings that point the classpath (vm ??) to >the same place > >Any ideas?? > >-Original Message- >From: Dov Rosenberg [mailto:[EMAIL PROTECTED] >Sent: 30 September 2004 18:10 >To: Tomcat Users List >Subject: Re: context sharing problems > >Why don't you put your shared classes into $CATALINA_HOME/shared/classes. >Then all of your web apps can see and use them > > > >-- >Dov Rosenberg >Conviveon Corporation >http://www.conviveon.com > >On 9/30/04 10:58 AM, "Michael Cornell" <[EMAIL PROTECTED]> wrote: > >> >> Hi, >> >> I am trying to share the same class files (and libraries) between two >> different web-apps one running in ROOT/ and one is admin/ >> >> Basically, I want the first one to run from the default context ie >> http://www.x.com/ >> And the second web-app to run as http://www.x.com/admin >> >> However, all of the classes for both web-apps are situated in the first >one >> (ROOT). >> >> This may seem a strange way of doing things, but I need to reflect the >> changes made in admin (basically a collection of jsps etc) in ROOT (a >> series of filters etc). I have actually got this to work using a tomcat >> plugin in eclipse because of the way eclipse shares libraries and >classpaths >> >> Does anyone know how I could do this for a standalone tomcat (running in >> windows)??? >> >> Just to clarify: >> >> Web-apps\ >> ROOT\ >> WEB-INF\ >> Classes\ >> >> My\package\name\MyFilter.class >> >> My\package\name\StrutsAction.class >> >> My\package\name\ApplicationResources.properties >> >> My\package\name\MySingletonIIWantTochangeViaTheGuiRealTime.class >> Admin\ >> WEB-INF\ >> Web\index.jsp >> >> >> >> >> >> >> >> Thanks for your help >> M >> >> >> >> --- >> Outgoing mail is certified Virus Free. >> Checked by AVG anti-virus system (http://www.grisoft.com). >> Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004 > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >--- >Incoming mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004 > >--- >Outgoing mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004 > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: context sharing problems
Well, I could do (and this actually works) but the problem then is that the web-apps are actually started up separately (in separate memory spaces) and the 'admin' one cannot access the singleton in the 'ROOT' one that has been initialised with some values.. I need some sort of context settings that point the classpath (vm ??) to the same place Any ideas?? -Original Message- From: Dov Rosenberg [mailto:[EMAIL PROTECTED] Sent: 30 September 2004 18:10 To: Tomcat Users List Subject: Re: context sharing problems Why don't you put your shared classes into $CATALINA_HOME/shared/classes. Then all of your web apps can see and use them -- Dov Rosenberg Conviveon Corporation http://www.conviveon.com On 9/30/04 10:58 AM, "Michael Cornell" <[EMAIL PROTECTED]> wrote: > > Hi, > > I am trying to share the same class files (and libraries) between two > different web-apps one running in ROOT/ and one is admin/ > > Basically, I want the first one to run from the default context ie > http://www.x.com/ > And the second web-app to run as http://www.x.com/admin > > However, all of the classes for both web-apps are situated in the first one > (ROOT). > > This may seem a strange way of doing things, but I need to reflect the > changes made in admin (basically a collection of jsps etc) in ROOT (a > series of filters etc). I have actually got this to work using a tomcat > plugin in eclipse because of the way eclipse shares libraries and classpaths > > Does anyone know how I could do this for a standalone tomcat (running in > windows)??? > > Just to clarify: > > Web-apps\ > ROOT\ > WEB-INF\ > Classes\ > > My\package\name\MyFilter.class > > My\package\name\StrutsAction.class > > My\package\name\ApplicationResources.properties > > My\package\name\MySingletonIIWantTochangeViaTheGuiRealTime.class > Admin\ > WEB-INF\ > Web\index.jsp > > > > > > > > Thanks for your help > M > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: context sharing problems
Why don't you put your shared classes into $CATALINA_HOME/shared/classes. Then all of your web apps can see and use them -- Dov Rosenberg Conviveon Corporation http://www.conviveon.com On 9/30/04 10:58 AM, "Michael Cornell" <[EMAIL PROTECTED]> wrote: > > Hi, > > I am trying to share the same class files (and libraries) between two > different web-apps one running in ROOT/ and one is admin/ > > Basically, I want the first one to run from the default context ie > http://www.x.com/ > And the second web-app to run as http://www.x.com/admin > > However, all of the classes for both web-apps are situated in the first one > (ROOT). > > This may seem a strange way of doing things, but I need to reflect the > changes made in admin (basically a collection of jsps etc) in ROOT (a > series of filters etc). I have actually got this to work using a tomcat > plugin in eclipse because of the way eclipse shares libraries and classpaths > > Does anyone know how I could do this for a standalone tomcat (running in > windows)??? > > Just to clarify: > > Web-apps\ > ROOT\ > WEB-INF\ > Classes\ > > My\package\name\MyFilter.class > > My\package\name\StrutsAction.class > > My\package\name\ApplicationResources.properties > > My\package\name\MySingletonIIWantTochangeViaTheGuiRealTime.class > Admin\ > WEB-INF\ > Web\index.jsp > > > > > > > > Thanks for your help > M > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
context sharing problems
Hi, I am trying to share the same class files (and libraries) between two different web-apps one running in ROOT/ and one is admin/ Basically, I want the first one to run from the default context ie http://www.x.com/ And the second web-app to run as http://www.x.com/admin However, all of the classes for both web-apps are situated in the first one (ROOT). This may seem a strange way of doing things, but I need to reflect the changes made in admin (basically a collection of jsps etc) in ROOT (a series of filters etc). I have actually got this to work using a tomcat plugin in eclipse because of the way eclipse shares libraries and classpaths Does anyone know how I could do this for a standalone tomcat (running in windows)??? Just to clarify: Web-apps\ ROOT\ WEB-INF\ Classes\ My\package\name\MyFilter.class My\package\name\StrutsAction.class My\package\name\ApplicationResources.properties My\package\name\MySingletonIIWantTochangeViaTheGuiRealTime.class Admin\ WEB-INF\ Web\index.jsp Thanks for your help M --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004