You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Will Heger <wi...@gmail.com> on 2010/07/23 22:51:43 UTC
root sitemap location in dev
When running a block in dev mode with jetty, the sitemap root is:
src/main/resources/COB-INF/sitemap.xmap
>From flow, I can determine this with:
cocoon.context.getRealPath("/")
But at startup, I can't locate the root sitemap. For example (using
SourceResolver from a java bean):
Source source = resolver.resolveURI("blockcontext:/my-app");
...will indicate: /target/classes/COB-INF
I believe this is accurate, that while the servlet context is the target
directory, in dev mode the sitemap root is in src.
I've looked through the beans in the application context and the
configuration settings, but I can't find anything that will point me to
where the sitemap root is. I can learn this from flow, but I'd really like
to know this at startup.
Thanks, any help is appreciated.
root sitemap location in dev
Posted by Will Heger <wi...@gmail.com>.
Hi, I'm reposting from users:
I'm trying to figure out where the sitemap root is located at startup.
For example, when running in jetty dev mode, the sitemap is in the the src
branch. And if I was in flow, I could figure this out by writing something
like:
cocoon.context.getRealPath("/")
But I have a bean that needs to know where the root is in its init-method.
Using SourceResolver like:
Source source = resolver.resolveURI("blockcontext:/my-app");
...will indicate: /target/classes/COB-INF which I think is the servlet
context, but not where the sitemap is.
So I looked through the application context and the configuration settings
and haven't spotted a bean or setting that will tell me.
Thanks for any help.