Thank you for the answer, Rheinhard,
I am afraid it does not. The web.xml I am using is from the cocoon
sample, and it contains all the necessary listeners. In the log file I
find startup information, but then it does not find the block.
By the way, if one expands the block's jar file under WEB-INF/classes,
so that we have:
WEB-INF/classes/COB-INF
WEB-INF/classes/META-INF
it should be found, no?
Jos
On Tue, 2009-11-10 at 14:48 +0100, Reinhard Pötz wrote:
> Jos Snellings wrote:
> > Hi,
> >
> > When trying to deploy a cocoon-3 block to Tomcat, it does not seem to
> > find it:
> > java.lang.RuntimeException: There is no block 'YourBlockName' deployed.
> > The available blocks are {}.
> >
> > I must say that the documentation on this issue is a little bit terse...
> > (http://cocoon.apache.org/subprojects/block-deployment/1.1/1471_1_1.html)
> >
> >>From what I understand:
> > - pack block in a .jar file
> > - add a line to the manifest file META-INF/MANIFEST.MF :
> > Cocoon-Block-Name: YourBlockName
> > (yes it ends with a newline)
> > - place .jar in lib directory of webapp
> >
> > Can anybody shed some light on this issue, please?
>
> In order to use a Cocoon *block*, you also have to install the
> BlockDeploymentServletContextListener in your web.xml:
>
> <listener>
> <listener-class>org.apache.cocoon.blockdeployment.BlockDeploymentServletContextListener</listener-class>
> </listener>
>
>
>
> If the block provides servlet-services, you have to use the
> DispatcherServlet of the servlet-service-framework which collects and
> mounts all servlets that are registered as Spring beans.
>
> <servlet>
> <description>Cocoon blocks dispatcher</description>
> <display-name>DispatcherServlet</display-name>
> <servlet-name>DispatcherServlet</servlet-name>
>
> <servlet-class>org.apache.cocoon.servletservice.DispatcherServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>DispatcherServlet</servlet-name>
> <url-pattern>/*</url-pattern>
> </servlet-mapping>
>
>
>
> And of course you have to properly setup Spring:
>
> <!--
> Declare Spring context listener which sets up the Spring Application
> Context containing all Cocoon components (and user defined beans as
> well).
> -->
> <listener>
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> </listener>
>
> <!--
> Declare Spring request listener which sets up the required
> RequestAttributes to support Springs and Cocoon custom bean scopes
> like the request scope or the session scope.
> -->
> <listener>
> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
> </listener>
>
>
> Does this answer your question?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]