cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Chicchiriccò <ilgro...@apache.org>
Subject Re: Connecting 2 blocks with C3.0
Date Mon, 11 Feb 2013 09:04:03 GMT
On 09/02/2013 21:33, Mansour Al Akeel wrote:
> I truly appreciate your help, and I agree with you that this needs to
> be documented in a place where it's easy to find. It is taking me a
> lot of time to try to figure out what is wrong.
> I think it's related more to the running mode and the configurations.
> For example when you declare a block as a dependency, its
>
> resources/META-INF/cocoon/spring/dev/mysite-servlet-service.xml
>
> has to have different name in the importing block, for example no two
> blocks should have this:
>
> resources/META-INF/cocoon/spring/block-servlet-service.xml
>
> I am still investigating, and can not confirm that this is the issue.

Just name the '*servlet-service.xml' file according to the containing 
block, as I did in my sample project [4] [5].

> Additionally
>
>
>    <!-- A Cocoon-Sitemap based servlet-service. -->
>    <bean id="com.mycompany.mysite.service"
> class="org.apache.cocoon.servlet.XMLSitemapServlet">
>      <servlet:context mount-path="/mysite"
> context-path="jar:classpath:/COB-INF/"/>
>    </bean>
>
> in
>
> https://github.com/ilgrosso/cocoon3EmptyProject/blob/COCOON3-105/mysite/src/main/resources/META-INF/cocoon/spring/dev/mysite-servlet-service.xml
>
> needs a bit more clarification. Specifically
>
>      <servlet:context mount-path="/mysite"
> context-path="jar:classpath:/COB-INF/"/>
>
> in development mode and this line in production:
>
>      <servlet:context mount-path="/mysite"
> context-path="jar:classpath:lib/${project.build.finalName}.jar!/COB-INF/"/>
>
> It will be nice if this is documented with the scenarios where we
> should use one of another.

Don't fear, it will be ;-)

Basically, the development mode (and related configuration files) is 
used when you are supposed to perform, well, actual development of your 
block, e.g. when you launch

mvn jetty:run

from your block's source directory, while the production mode is used 
when your block is deployed within a containing webapp.

Anyway, why don't you prepare a draft of the page for COCOON3-119 [6]? 
As you can see from this sample [7], the format is APT [8], quite simple 
to handle.

Regards.

[1] https://github.com/ilgrosso/cocoon3EmptyProject/tree/COCOON3-105
[2] https://github.com/ilgrosso/cocoon3EmptyProject/blob/COCOON3-105/mysite2/src/main/resources/COB-INF/sitemap.xmap
[3] http://cocoon.apache.org/2.2/1291_1_1.html
[4] https://github.com/ilgrosso/cocoon3EmptyProject/blob/COCOON3-105/mysite/src/main/resources/META-INF/cocoon/spring/mysite-servlet-service.xml
[5] https://github.com/ilgrosso/cocoon3EmptyProject/blob/COCOON3-105/mysite2/src/main/resources/META-INF/cocoon/spring/mysite2-servlet-service.xml
[6] https://issues.apache.org/jira/browse/COCOON3-119
[7] https://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/parent/src/site/apt/features.apt
[8] http://maven.apache.org/doxia/references/apt-format.html

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message