cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26566] - CLI/CocoonBean is broken with portal-block
Date Tue, 10 Feb 2004 22:32:34 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26566>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26566

CLI/CocoonBean is broken with portal-block





------- Additional Comments From simon.mieth@t-online.de  2004-02-10 22:32 -------
It looks that all portal-components have this problem, all of them try to get
the "servlet-config". I tried to check the CLI-Context with:

in the contextualize-method

public void contextualize(Context context) throws ContextException {
Object obj = context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
if(!(obj instanceof org.apache.cocoon.environment.commandline.CommandLineContext)){

//do contextualize

}else{

// this avoids startup errors if the portal is configured for the CLI
// environment
this.getLogger().warn("The JSR-168 support is disabled as the servlet context is
not available.");	
}

}

but this is an ugly hack, not a solution. 
Is there a simple way to check the Context (a key)?

Or to add a cocoon-cli.xconf to cocoon, where only cli-working components are
configured?

Mime
View raw message