cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject Re: Block-path input module
Date Mon, 26 Nov 2007 08:15:58 GMT
On Mon, 2007-11-26 at 08:30 +0100, Reinhard Poetz wrote:
> Joerg Heinicke wrote:
> > On 25.11.2007 10:32 Uhr, Grzegorz Kossakowski wrote:
> >> I'm quite reluctant to accept this patch because I believe that one 
> >> should never rely on block's
> >> directory location
> > 
> > Why? It might be necessary when communicating with other systems. There 
> > is no difference than with WAR and servlet context directory.
> 
> I have the same concerns like Grek. This input module offers a possibility to 
> cirumvent the public contract of using the 'servlet' protocol and I'm not sure 
> if this is really a good idea.

Hmm, the input module is based on the blockcontext:/ protocol which is
used frequently in our code. 

Like Joerg Heinicke said "There is no difference than with WAR and
servlet context directory." 

The normal usecase would be to use resources from the context that we do
not want to expose via the sitemap or where one is implementing a
fallback mechanism.

<!-- Base location of the dispatcher-->
    <match pattern="dispatcher.home">
      <select>
        <location src="{global:project.dispatcher.home}"/>
        <location src="blockcontext:/dispatcher/"/>
      </select>
    </match>

...

> 
> Torsten, before we apply this patch,  can you explain your use case which in 
> your opinion can only be solved by using this input module?

http://marc.info/?t=119435290400005&r=1&w=2

...but anyhow I am now using the blockcontext:/ protocol directly,
without contacting the input module.

Still I depend on the context and I do not see much different between
servlet context:/ and blockcontext:/ nor the evil to use it.

How would you create the starting match for the cocoon-welcome block
otherwise?

<map:match pattern="">
  <map:generate type="xpathtraversable" src="blockcontext:/">
...

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Mime
View raw message