File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes 2 webapps, same context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "2 webapps, same context" Watch "2 webapps, same context" New topic
Author

2 webapps, same context

Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4910
    
  10

I have 2 apps, both accessing the same singleton pattern class, but still 2 instances of these class are made (because this class is a singleton in the context of those 2 apps - this is my guess, am i wrong?)

So is it possible to add 2 web-apps to the same context? If so, how do you do it? if no, is there an alternative?


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Did not you already ask this here?

Please don't post the same question multiple times.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4910
    
  10

There i asked how to create a singleton on server-level instead of application-level.

Here i wonna know if it's possible to run 2 applications under the same context. I guess this are 2 different questions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 2 webapps, same context
 
Similar Threads
Singleton class
2 different types of singleton
Spring - Multiple IoC Containers with Singleton Bean in a JVM
Tomcat , Servlet and Singleton
how to maintain state