> From: Bertrand Delacretaz [mailto:[EMAIL PROTECTED]]
> 
> On Saturday 19 January 2002 06:05, Conal Tuohy wrote:
> > . . .
> > I think my options are either to write a NewsGroupGenerator in the
Cocoon
> > framework, or a URLStreamHandler (and URLStreamHandlerFactory) in
the Java
> > URL framework. With a URL-handler I could just use the standard
> > FileGenerator like so:
> > . . .
> 
> I'd go for an URLStreamHandler, which is reusable outside of Cocoon.
> 
> I don't know if Cocoon allows for configurable URLStreamHandlers (or
are they
> configurable via java system properties?), but configurable handlers
would
> definitely be a plus.

I do not recall correctly why, but there are some issues with standard
URLStreamHandlers, that's why Cocoon have own set of classes to handle
protocols. If you wish to have better integration with Cocoon (including
better integration with caching sub system), consider writing your news
protocol implementing using org.apache.cocoon.environment.Source. Look
into org.apache.cocoon.components.source package for the examples.

All Cocoon protocols are declared in cocoon.xconf file:
------8<-------------------------------------------------
  <!-- URL Factory:
    The url factory adds special url protocols to the system, they are
then
    available inside Cocoon, e.g. as a source argument for one of the
sitemap
    components.
  -->
  <url-factory logger="core.url-factory">
    <!-- Allows access to resources available from the ClassLoader,
         using getResource() method. -->
    <protocol name="resource"
class="org.apache.cocoon.components.url.ResourceURLFactory"/>
    <!-- Allows access to resources available from the servlet context,
         using getResource() method. -->
    <protocol name="context"
class="org.apache.cocoon.components.url.ContextURLFactory"/>
    <!-- Add here protocol factories for your own protocols -->
  </url-factory>
------8<-------------------------------------------------

Vadim



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to