Grzegorz Kossakowski skrev:
Daniel Fagerstrom pisze:
Grzegorz Kossakowski skrev:
Daniel Fagerstrom pisze:
So would it be possible to access resources via servlets: source (by
using internally a servlet: source) or not?
I think that should be possible. URIs could look like:
servlets:/<bean id>/<internal path>
I wonder why we really need new source in this case at all. Possibility
to reference bean by bean id instead of connection name was already
discussed: https://issues.apache.org/jira/browse/COCOON-2044
Why do we need to invent new source?
The important part is that "servlets:/" is listable and give a listing
of all servlet services. The above thing is because the listed servlet
services must have own URIs to be usable. If that could be done by
extending the ordinary servlet: protocol I'm fine with that as well. But
extending the servlet: protocol has the problem that you use the same
URI part for two distinct uses, both for servlet service relative names
and for some kind of global naming scheme like bean id. There is some
small risk that they are going to collide.
After having a list of servlets we would have to find out which one
contain samples. I guess that it's good idea to ask every servlet for
certain resource (e.g. samples.xsamples file).
Yes.
But how we do this not being connected to all these servlets?
As Giacomo suggested it could be done by making the list from
o.a.c.servletservice.DispatcherServlet#createMountableServletsMap
available in a Spring bean. Another possibility would be to let the
blocks source depend on a bean map
http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator/impl/BeanMap.java
that collects all beans that implement Servlet.
Do you mean that servlet will be able to construct it's connection at
runtime or it will be able to reference resources from servlets that it
is not connected to?
Does second option fits to our design of servlet-service-fw?
I'm not able to parse the above paragraphs at all. Could you please be a
little bit more verbose, so that I can understand what all the uses of
"servlet" and "it" refers to ;)
/Daniel