cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Lepine <MLep...@TRISECT.com>
Subject RE: Initializing org.apache.cocoon.Engine
Date Wed, 19 Apr 2000 16:14:16 GMT
Schmitt, Christian wrote:
> Hi,
> I'm using a servlet and pipe it's output into Cocoon using 
> "cocoonEngine =
> Engine.getInstance();" etc. Now my problem is when the 
> WebServer (Apache
> 1.3.12/JServ 1.1) start up fresh the Cocoon engine doesn't seem to be
> initialized. The code "cocoonEngine = Engine.getInstance();" 
> throws the
> Exception "The Cocoon engine has not been initialized!". It 
> only works after
> I run an example from the cocoon/samples directory. Is there 
> a way I can
> initialize the engine by myself when the exception is thrown?
>
> I could look it up in the source code, but so far I have no 
> idea which file
> to start in :-(


The code to initialize Cocoon, is in the Cocoon servlet's init() method. The
properties file is loaded, then the engine is initialized (the engine is
initialized via a call to Engine.getInstance(Configurations confs, Object
context)).

What you probably want to do, is instruct your servlet engine (JServ, JRun,
Servlet Exec, etc.) to load the Cocoon servlet when your web server
initializes. 

In JServ, go to the zone.properties file you're using for Cocoon, look for:

# Startup Servlets
###################

and add something like this:

servlets.startup=org.apache.cocoon.Cocoon

In Servlet Exec, go to the Configure Servlets area of the admin tool, look
at your entry for Cocoon, and simply add a number in the "Load Order" field,
click submit, then restart your web server.

This is all I have. I hope it helps.
 
> Thanks for any insight.
> 
> Christian Schmitt
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Mime
View raw message