You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Robin Wyles <ro...@robinwyles.com> on 2008/10/27 15:22:04 UTC
Internal pipelines and servlet protocol
Hi,
In the default sitemap generated with the block archetype there is a
pipeline as follows:
<map:pipeline id="internal-resource" internal-only="true">
<!-- Put matchers for internal (accessible only to Cocoon
blocks) resources here
More details: http://cocoon.zones.apache.org/daisy/cdocs-
site-main/g2/1345.html -->
<map:match pattern="resource/internal/**">
<map:read src="resource/internal/{1}"/>
</map:match>
</map:pipeline>
On the docs page linked to above it states that blocks may have
"internal resources that are accessible to other block via servlet:
protocol". However, from my tests it seems that internal-only
pipelines are still not accessible from other blocks via the servlet
protocol. Am I going mad?
How can I make pipelines which are only to be accessed by blocks
within my app inaccessible to the world at large?
Cheers,
Robin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Internal pipelines and servlet protocol
Posted by Robin Wyles <ro...@robinwyles.com>.
Hi All,
Apologies for the re-post but I'm still searching for an answer to my
issue below... In a nutshell, internal pipelines are not accessible
using the servlet: protocol, whereas the C2.2 document seems to
suggest they should be.
If a Cocoon dev could take a look at the thread below, and give me
any pointers at all I'd really appreciate it.
Many thanks,
Robin
On 3 Nov 2008, at 21:03, Robin Wyles wrote:
> Hi Jeroen,
>
> Below is a simple sitemap that reproduces the problem. Calling
> "internal-resource" results in a ResourceNotFoundException, while
> calling "external-resource" serves the file as expected. I've also
> taken the liberty of sending you a test block off-list so you can
> quickly test the problem.
>
> Many thanks for your help with this...
>
> Robin
>
>
> <map:sitemap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0 http://
> cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd"
> xmlns:map="http://apache.org/cocoon/sitemap/1.0">
> <map:pipelines>
> <!--+
> | Public pipelines
> +-->
> <map:pipeline id="test">
> <!-- Test to show inaccesibility of internal pipelines via
> servlet protocol. -->
>
> <map:match pattern="internal-resource">
> <map:generate src="servlet:/resource/internal/test.xml"/>
> <map:serialize type="html"/>
> </map:match>
>
> <map:match pattern="external-resource">
> <map:generate src="servlet:/resource/external/test.xml"/>
> <map:serialize type="html"/>
> </map:match>
>
> </map:pipeline>
>
> <!--+
> | Default pipelines
> +-->
> <map:pipeline id="internal-resource" internal-only="true">
> <!-- Put matchers for internal (accessible only to Cocoon
> blocks) resources here
> More details: http://cocoon.zones.apache.org/daisy/cdocs-
> site-main/g2/1345.html -->
> <map:match pattern="resource/internal/**">
> <map:read src="resource/internal/{1}"/>
> </map:match>
> </map:pipeline>
>
> <map:pipeline id="external-resource">
> <!-- Put matchers for external (accessible to the outside
> world, e.g. browser) resources here.
> More details: http://cocoon.zones.apache.org/daisy/cdocs-
> site-main/g2/1345.html -->
> <map:match pattern="resource/external/**">
> <map:read src="resource/external/{1}"/>
> </map:match>
> </map:pipeline>
>
> <map:pipeline id="service">
> <!-- Put your servlet service matchers here.
> More details: http://cocoon.zones.apache.org/daisy/cdocs-
> site-main/g2/1345.html -->
> </map:pipeline>
> </map:pipelines>
>
> </map:sitemap>
>
> On 3 Nov 2008, at 18:33, Jeroen Reijn wrote:
>
>> Hi Robin,
>>
>> I've been lagging behind on my Cocoon related things for a while,
>> but where are you trying to fetch this internal pipeline from?
>> Coul you show us the part of a sitemap that calls the below
>> matcher (which does not work)?
>>
>> Regards,
>>
>> Jeroen
>>
>> Robin Wyles wrote:
>>> Hi,
>>> Can any devs shed some light on my previous question below?
>>> Thanks,
>>> Robin
>>> On 27 Oct 2008, at 14:22, Robin Wyles wrote:
>>>> Hi,
>>>>
>>>> In the default sitemap generated with the block archetype there
>>>> is a pipeline as follows:
>>>>
>>>> <map:pipeline id="internal-resource" internal-only="true">
>>>> <!-- Put matchers for internal (accessible only to Cocoon
>>>> blocks) resources here
>>>> More details: http://cocoon.zones.apache.org/daisy/cdocs-
>>>> site-main/g2/1345.html -->
>>>> <map:match pattern="resource/internal/**">
>>>> <map:read src="resource/internal/{1}"/>
>>>> </map:match>
>>>> </map:pipeline>
>>>>
>>>> On the docs page linked to above it states that blocks may have
>>>> "internal resources that are accessible to other block via
>>>> servlet: protocol". However, from my tests it seems that
>>>> internal-only pipelines are still not accessible from other
>>>> blocks via the servlet protocol. Am I going mad?
>>>>
>>>> How can I make pipelines which are only to be accessed by blocks
>>>> within my app inaccessible to the world at large?
>>>>
>>>> Cheers,
>>>>
>>>> Robin
>>>>
>>>> -------------------------------------------------------------------
>>>> --
>>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Internal pipelines and servlet protocol
Posted by Robin Wyles <ro...@robinwyles.com>.
Hi Jeroen,
Below is a simple sitemap that reproduces the problem. Calling
"internal-resource" results in a ResourceNotFoundException, while
calling "external-resource" serves the file as expected. I've also
taken the liberty of sending you a test block off-list so you can
quickly test the problem.
Many thanks for your help with this...
Robin
<map:sitemap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0 http://
cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd"
xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:pipelines>
<!--+
| Public pipelines
+-->
<map:pipeline id="test">
<!-- Test to show inaccesibility of internal pipelines via
servlet protocol. -->
<map:match pattern="internal-resource">
<map:generate src="servlet:/resource/internal/test.xml"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="external-resource">
<map:generate src="servlet:/resource/external/test.xml"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
<!--+
| Default pipelines
+-->
<map:pipeline id="internal-resource" internal-only="true">
<!-- Put matchers for internal (accessible only to Cocoon
blocks) resources here
More details: http://cocoon.zones.apache.org/daisy/cdocs-
site-main/g2/1345.html -->
<map:match pattern="resource/internal/**">
<map:read src="resource/internal/{1}"/>
</map:match>
</map:pipeline>
<map:pipeline id="external-resource">
<!-- Put matchers for external (accessible to the outside
world, e.g. browser) resources here.
More details: http://cocoon.zones.apache.org/daisy/cdocs-
site-main/g2/1345.html -->
<map:match pattern="resource/external/**">
<map:read src="resource/external/{1}"/>
</map:match>
</map:pipeline>
<map:pipeline id="service">
<!-- Put your servlet service matchers here.
More details: http://cocoon.zones.apache.org/daisy/cdocs-
site-main/g2/1345.html -->
</map:pipeline>
</map:pipelines>
</map:sitemap>
On 3 Nov 2008, at 18:33, Jeroen Reijn wrote:
> Hi Robin,
>
> I've been lagging behind on my Cocoon related things for a while,
> but where are you trying to fetch this internal pipeline from? Coul
> you show us the part of a sitemap that calls the below matcher
> (which does not work)?
>
> Regards,
>
> Jeroen
>
> Robin Wyles wrote:
>> Hi,
>> Can any devs shed some light on my previous question below?
>> Thanks,
>> Robin
>> On 27 Oct 2008, at 14:22, Robin Wyles wrote:
>>> Hi,
>>>
>>> In the default sitemap generated with the block archetype there
>>> is a pipeline as follows:
>>>
>>> <map:pipeline id="internal-resource" internal-only="true">
>>> <!-- Put matchers for internal (accessible only to Cocoon
>>> blocks) resources here
>>> More details: http://cocoon.zones.apache.org/daisy/cdocs-
>>> site-main/g2/1345.html -->
>>> <map:match pattern="resource/internal/**">
>>> <map:read src="resource/internal/{1}"/>
>>> </map:match>
>>> </map:pipeline>
>>>
>>> On the docs page linked to above it states that blocks may have
>>> "internal resources that are accessible to other block via
>>> servlet: protocol". However, from my tests it seems that internal-
>>> only pipelines are still not accessible from other blocks via the
>>> servlet protocol. Am I going mad?
>>>
>>> How can I make pipelines which are only to be accessed by blocks
>>> within my app inaccessible to the world at large?
>>>
>>> Cheers,
>>>
>>> Robin
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Internal pipelines and servlet protocol
Posted by Jeroen Reijn <j....@onehippo.com>.
Hi Robin,
I've been lagging behind on my Cocoon related things for a while, but
where are you trying to fetch this internal pipeline from? Coul you show
us the part of a sitemap that calls the below matcher (which does not work)?
Regards,
Jeroen
Robin Wyles wrote:
> Hi,
>
> Can any devs shed some light on my previous question below?
>
> Thanks,
>
> Robin
>
> On 27 Oct 2008, at 14:22, Robin Wyles wrote:
>
>> Hi,
>>
>> In the default sitemap generated with the block archetype there is a
>> pipeline as follows:
>>
>> <map:pipeline id="internal-resource" internal-only="true">
>> <!-- Put matchers for internal (accessible only to Cocoon
>> blocks) resources here
>> More details:
>> http://cocoon.zones.apache.org/daisy/cdocs-site-main/g2/1345.html -->
>> <map:match pattern="resource/internal/**">
>> <map:read src="resource/internal/{1}"/>
>> </map:match>
>> </map:pipeline>
>>
>> On the docs page linked to above it states that blocks may have
>> "internal resources that are accessible to other block via servlet:
>> protocol". However, from my tests it seems that internal-only
>> pipelines are still not accessible from other blocks via the servlet
>> protocol. Am I going mad?
>>
>> How can I make pipelines which are only to be accessed by blocks
>> within my app inaccessible to the world at large?
>>
>> Cheers,
>>
>> Robin
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Internal pipelines and servlet protocol
Posted by Robin Wyles <ro...@robinwyles.com>.
Hi,
Can any devs shed some light on my previous question below?
Thanks,
Robin
On 27 Oct 2008, at 14:22, Robin Wyles wrote:
> Hi,
>
> In the default sitemap generated with the block archetype there is
> a pipeline as follows:
>
> <map:pipeline id="internal-resource" internal-only="true">
> <!-- Put matchers for internal (accessible only to Cocoon
> blocks) resources here
> More details: http://cocoon.zones.apache.org/daisy/cdocs-
> site-main/g2/1345.html -->
> <map:match pattern="resource/internal/**">
> <map:read src="resource/internal/{1}"/>
> </map:match>
> </map:pipeline>
>
> On the docs page linked to above it states that blocks may have
> "internal resources that are accessible to other block via servlet:
> protocol". However, from my tests it seems that internal-only
> pipelines are still not accessible from other blocks via the
> servlet protocol. Am I going mad?
>
> How can I make pipelines which are only to be accessed by blocks
> within my app inaccessible to the world at large?
>
> Cheers,
>
> Robin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org