cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Preusker <n.preus...@googlemail.com>
Subject [C3] Accessing XSLT URL that requires Authentication
Date Fri, 24 Apr 2009 15:08:18 GMT
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("
http://example.com/somexslt.xslt")));
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

Mime
View raw message