tags:

views:

128

answers:

1

Hi,

Is there a way by which different managed beans in different faces-config.xml placed in multiple WARs.

A: 

No, they reside in different contexts.

Depending on the servlet container, there are ways to share / synchronize the two contexts.

Using ServletContext.getContext(path) would return the other context. There you can obtain all application-scoped beans. (The context must be configured to be accessible from other contexts).

But this is too much hassle for something that should be achieved in other ways.

If you want your two applications to communicate with each other, make them a channel - via web services, JMS, etc.

Update: Tomcat's Signle-Sign-On Valve might be helpful (if using tomcat)

The Single Sign On Vale is utilized when you wish to give users the ability to sign on to any one of the web applications associated with your virtual host, and then have their identity recognized by all other web applications on the same virtual host.

Bozho
Let me explain you the scenario. We are in the process of developing a common framework. Lets say I have a common war which takes user input and password and on submit I forward it to different applications which are in different wars.
Nrusingha
@Nrusingha that makes is a bit more clear. check my update
Bozho