You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Rainer Pruy <Ra...@Acrys.COM> on 2008/01/07 15:24:04 UTC
Cocoon 2.2 - referencing local pipelines from map:part src
Hallo,
I got somehow lost on trying to change from a 2.1.x habit of using map:resource referencing pipelines via "cocoon:" protocol to
something more appropriate with cocoon 2.2.
As I failed miserably on finding a suitable reference on this, I'm trying with the list.....
>From available doc and following infos from the list I got convinced that using servlet: protocol is the way to go.
However, with such I always get "No dispatcher" errors.
The relevant pipeline fragment is currently:
------------------------------
<map:pipelines>
<map:match pattern="**">
<map:aggregate element="page" ns="http://www.acrys.com/risc-1.0" prefix="ns" label="content">
<map:part src="servlet:research:/research-nav"/>
<map:part src="servlet:research:/research-src"/>
</map:aggregate>
<map:transform src="resource/internal/page.xsl"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
<map:pipeline id="parts" internal-only="true">
<map:match name="research-nav">
<map:generate type="research">
<map:parameter name="mode" value="navigate"/>
<map:parameter name="modeinfo" value="../{1}"/>
<map:parameter name="area" value="{request-param:area}"/>
<map:parameter name="idx" value="{request-param:idx}"/>
</map:generate>
</map:match>
<map:match name="research-src">
<map:generate type="research">
<map:parameter name="mode" value="../{1}"/>
<map:parameter name="area" value="{request-param:area}"/>
<map:parameter name="idx" value="{request-param:idx}"/>
</map:generate>
</map:match>
<map:match pattern="navigate">
<map:generate type="research">
<map:parameter name="mode" value="navigate"/>
<map:parameter name="modeinfo" value="summary"/>
<map:parameter name="area" value="{request-param:area}"/>
<map:parameter name="idx" value="{request-param:idx}"/>
</map:generate>
<map:transform src="resource/internal/page.xsl"/>
<map:serialize type="html"/>
</map:match>
</map:pipelines>
------------------------------
(The "research" generator is a special local component)
The block is mapped to prefix "/research".
Using url "http://localhost:8888/research/summary" from a browser leads to an error page being shown
--------------
Problem in creating the Request
Message: null
Description: No details available.
Sender: org.apache.cocoon.servlet.multipart.MultipartFilter
Source: Cocoon Servlet
cause
No dispatcher for servlet:research:/research-nav
request-uri
/research/summary
--------------
What do I miss?
Any info appreciated
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon 2.2 - referencing local pipelines from map:part src
Posted by Grzegorz Kossakowski <gk...@apache.org>.
Rainer Pruy pisze:
> Hallo,
> I got somehow lost on trying to change from a 2.1.x habit of using map:resource referencing pipelines via "cocoon:" protocol to
> something more appropriate with cocoon 2.2.
>
> As I failed miserably on finding a suitable reference on this, I'm trying with the list.....
>
> From available doc and following infos from the list I got convinced that using servlet: protocol is the way to go.
> However, with such I always get "No dispatcher" errors.
Hello Rainer,
Although I'm not familiar to "No dispatcher" error I will try to be helpful.
> The relevant pipeline fragment is currently:
>
>
> ------------------------------
> <map:pipelines>
> <map:match pattern="**">
> <map:aggregate element="page" ns="http://www.acrys.com/risc-1.0" prefix="ns" label="content">
> <map:part src="servlet:research:/research-nav"/>
> <map:part src="servlet:research:/research-src"/>
> </map:aggregate>
> <map:transform src="resource/internal/page.xsl"/>
> <map:serialize type="html"/>
> </map:match>
> </map:pipeline>
First of all, if you reference pipeline from the same sitemap you can drop connection name and use
shortened version, e.g.:
servlet:/research-nav
> <map:pipeline id="parts" internal-only="true">
I'm not 100% sure but I guess that servlet: won't work with internal-only pipelines because pipeline
engine does not recognize servlet: requests as coming from Cocoon. If my guess is right, it's
definitively a bug but fix for it should be quite trivial. If you confirm there is a bug, create a
bug report, please.
> <map:match name="research-nav">
> <map:generate type="research">
> <map:parameter name="mode" value="navigate"/>
> <map:parameter name="modeinfo" value="../{1}"/>
> <map:parameter name="area" value="{request-param:area}"/>
> <map:parameter name="idx" value="{request-param:idx}"/>
> </map:generate>
> </map:match>
> <map:match name="research-src">
> <map:generate type="research">
> <map:parameter name="mode" value="../{1}"/>
> <map:parameter name="area" value="{request-param:area}"/>
> <map:parameter name="idx" value="{request-param:idx}"/>
> </map:generate>
> </map:match>
> <map:match pattern="navigate">
> <map:generate type="research">
> <map:parameter name="mode" value="navigate"/>
> <map:parameter name="modeinfo" value="summary"/>
> <map:parameter name="area" value="{request-param:area}"/>
> <map:parameter name="idx" value="{request-param:idx}"/>
> </map:generate>
> <map:transform src="resource/internal/page.xsl"/>
> <map:serialize type="html"/>
> </map:match>
> </map:pipelines>
> ------------------------------
> (The "research" generator is a special local component)
>
> The block is mapped to prefix "/research".
> Using url "http://localhost:8888/research/summary" from a browser leads to an error page being shown
I guess you are confusing here two things: mount-path ("/research") and connections between
servlets. If it's the same servlet (the same sitemap) you don't need any connection name.
I hope that helps a little.
--
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org