Giacomo Pati skrev:
...
Reinhard answered the first part.
Next comes, while Felix is converting the samples to use servlet-services, that
outside a request to
the DisplatcherServlet (outside a block context) there is no such information
available to where a
block is mounted to.
I agree that such information need to be available.
After having a look into the DispatcherServlet I would propose to refactor the
logic in the
createMountableServletsMap method into a Spring bean so that for example the
cocoon-webapp can
access it and produce a listing page of all samples it has found in the
work/blocks directory
with the correct links to them.
WDYT?
A Spring bean with directory info seem like a good idea. For increasing
the usability I would suggest to implement a new source as well
"servlets:" e.g. This source should be a listable source so that you can
use it with e.g. the directory generator. The source would of course
only be listable at the root level the listed sources would of course be
ordinary servlet: sources.
So in
http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-webapp/src/main/webapp/blocks/sitemap.xmap
we could use:
<map:generate type="xpathtraversable" src="servlets:/">
instead of the current construction. I started to work on something like
that half a year ago but never finished it.
/Daniel