cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Pötz <>
Subject Re: [C3] Accessing XSLT URL that requires Authentication
Date Mon, 27 Apr 2009 21:26:32 GMT
Nils Preusker wrote:
> Hi all,
> I just started trying out cocoon 3 alpha 1 and I'm wondering if there is
> a solution for the following scenario: I'm retrieving all my XML and
> XSLT content via URLs that require authentication. Without the
> authentication I could simply create a pipeline like this:
> ...
> Pipeline pipeline = new NonCachingPipeline();
> pipeline.addComponent(new StringGenerator("<x></x>"));
> pipeline.addComponent(new XSLTTransformer(new
> URL("")));
> pipeline.addComponent(new XMLSerializer());
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> pipeline.setup(baos);
> pipeline.execute();
> ...
> That's almost the same as the example on the cocoon website. The only
> difference is that instead of a file I'm using a URL to provide the
> XSLT. This works if I disable authentication for my XML/XSLT repository.
> But when I enable authentication, I'll end up with an exception and a
> 401 from apache somewhere in the stack trace...
> So in short: I'm wondering if there is a way to create an
> XSLTTransformer that can retrieve data from URLs that require
> authentication?
> Any help would be greatly appreciated! Cheers, Nils

Hi Nils,

AFAIK the Java URL object supports RFC1738: See

Could you please try

Please report back if that works for you. Thanks!

Reinhard Pötz                           Managing Director, {Indoqa} GmbH

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member        

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message