bean to bean communication

I have two beans that are instantiated by a JSP. Is it possible to write code in one of the beans that will access methods in the other bean? If yes, then how? Many ThanksJ-P
[208 byte] By [janquetil] at [2007-9-26 3:48:11]
# 1

your question does not make a lot of sense. Beans are like any java Object: you can access the methods with the proper declaration. So, I suspect that you want to write a method on, say bean A, that accesses the instance of bean B that was created in the JSP. Why don't you just switch the method declarations so that the signature takes an instance of bean B? Like,

BeanA a = new BeanA();

BeanB b = new BeanB();

a.accessOtherBean(b);

b.accessOtherBean(a);

rvflannery at 2007-6-29 12:31:32 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...