cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Wyles <>
Subject Calling components from java
Date Mon, 29 Nov 2004 10:23:28 GMT

I am trying to call a cocoon component from within a Java class - is 
this possible?

 From flow I use...

var my_component = cocoon.getComponent(Packages.MyComponent.ROLE);

... which works great. I have tried the following in my java class...

CocoonComponentManager manager = new CocoonComponentManager();
MyComponent my_component = (MyComponent) 

- this results in  "java.lang.NullPointerException"

... when I try:

DefaultComponentManager = new DefaultComponentManager();
MyComponent my_component = (MyComponent) 

I get " org.apache.avalon.framework.component.ComponentException: 
Unable to provide implementation. (key [MyComponent])"

Can anyone point me to samples of how I can access Cocoon components 
(declared in cocoon.xconf) in my java classes?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message