On Wed, 2007-11-07 at 08:45 +0100, Thorsten Scherler wrote:
> On Tue, 2007-11-06 at 21:08 +0100, Grzegorz Kossakowski wrote:
> > Thorsten Scherler pisze:
> > > Hi all,
> > >
> > > I found BlockPathModule.java and BlockCompletePathModule to return the
> > > servlet path for a block.
> > >
> > > However I need an input module which returns me the full file path
> > > location of the base dir of a block.
> > >
> > > Like {block-filepath:blockName} e.g. {block-filepath:myBlock1} would
> > > return /home/me/myCocoon/blocks/myblock1.
> > >
> > > Not sure whether I have not found the module or whether there is not yet
> > > such a module.
> > >
> > > TIA for any information.
> >
> > There is a block-context: module AFAIR but it's meant for internal use only.
> >
> > My question is: why do you need such module?
>
...
> The idea is to allow the user to override certain properties and
> locations via the project locationmap. There is one principal property
> (in the dispatcher) which points to the full uri (most likely in the
> file system).
>
> <!-- Base location of the builded dispatcher plugin-->
> <match pattern="dispatcher.home">
> <location src="{global:dispatcher.home}"/>
> </match>
>
> ...but I thought about it and I think I can solve the problem a wee bit
> different since it is caused by a slight overkill of customization.
No, it is not working without an absolute path. :(
Let me explain why and maybe there is a solution that I do not see.
I have a block and my main webapp, where I only define some contracts.
All requests are passed to the block which is using my project specific
contracts for doing transformations and alike.
The request/response circle is something like the following:
request -> myWebapp -> dispatcher-block -> locationmap-resolving ->
dispatcher-block -> myWebapp -> response
The problem is with this invocation that
<match pattern="dispatcher.home">
<location src="{global:dispatcher.home}"/>
</match>
needs to be absolute.
Will developing I had
<match pattern="dispatcher.home">
<location src=""/>
</match>
...
<match pattern="hooks-to-*.xsl">
<location src="{lm:dispatcher.home}resource/stylesheets/{0}"/>
</match>
which was working fine since I was testing the dispatcher-block, but now
since I am in my webapp now the relative path is resolved to the current
app and not to the dispatcher block any more.
Meaning the resources cannot be found anymore.
I could not find the block-context: which Grzegorz has recommended.
Anybody has an idea, since I am running out of them?
TIA
salu2
--
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]