You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nils Köster <ni...@lolili.de> on 2004/04/15 18:54:57 UTC
Auth-Protect for map:read
Hi there,
While properly authenticated (-> other pages work quite well) the one below
doesn't show my pdf but a message like this:
Error during resolving of the input stream
org.apache.cocoon.ResourceNotFoundException: Error during resolving of the
input stream: org.apache.excalibur.source.SourceNotFoundException:
file:/C:/Programme/Apache Software Foundation/Tomcat
5.0/webapps/cocoon/nkpm/resources/documents/ doesn't exist.
cause: java.io.FileNotFoundException: C:\Programme\Apache Software
Foundation\Tomcat 5.0\webapps\cocoon\nkpm\resources\documents (Zugriff
verweigert)
Without the auth-protect it works.
<map:pipeline>
<map:match pattern="lounge/documents/*">
<map:act type="auth-protect">
<map:parameter name="handler"
value="portalhandler"/>
<map:read mime-type="application/pdf"
src="resources/documents/{1}"/>
</map:act>
</map:match>
</map:pipeline>
What's wrong in it??
Thanx,
Reegards,
Nils
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Auth-Protect for map:read
Posted by Joerg Heinicke <jo...@gmx.de>.
On 15.04.2004 18:54, Nils Köster wrote:
> Hi there,
>
> While properly authenticated (-> other pages work quite well) the one below
> doesn't show my pdf but a message like this:
>
> Error during resolving of the input stream
>
> org.apache.cocoon.ResourceNotFoundException: Error during resolving of the
> input stream: org.apache.excalibur.source.SourceNotFoundException:
> file:/C:/Programme/Apache Software Foundation/Tomcat
> 5.0/webapps/cocoon/nkpm/resources/documents/ doesn't exist.
>
> cause: java.io.FileNotFoundException: C:\Programme\Apache Software
> Foundation\Tomcat 5.0\webapps\cocoon\nkpm\resources\documents (Zugriff
> verweigert)
It tries to access the directory, not a file in the directory.
> Without the auth-protect it works.
auth-protect is an action and so sets the context for evaluating the
sitemap variables. With {1} you access the return map of the action and
the result is obviously empty => you read "resources/documents/". Inside
the action it must be {../1} to access the matcher.
> <map:pipeline>
> <map:match pattern="lounge/documents/*">
> <map:act type="auth-protect">
> <map:parameter name="handler"
> value="portalhandler"/>
> <map:read mime-type="application/pdf"
> src="resources/documents/{1}"/>
> </map:act>
> </map:match>
> </map:pipeline>
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org