You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hubert Holtz <Tu...@gmx.net> on 2003/05/22 11:34:56 UTC

downloading with cocoon problem

Hy all,

After reading some posts here about the ResourceReader I thought I would know how to manage downloads, but
I think I miss some points to get it running.

Here is my sitemap:

<!-- *************READERS***************-->
	
	<map:readers default="resource">
		<map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"/>
		<map:reader name="jsp" src="org.apache.cocoon.reading.JSPReader"/>
	</map:readers>
...

<!-- downloads -->

		<map:match pattern="download/*.pdf">
			<map:read mime-type="application/pdf" src="download/{1}.pdf"/>
		</map:match>

I hav a link which is the following: http://localhost:8080/test/download/d.pfd
But if I try to load the pdf I just get an "resource not found" error.

I'm sure I've done something wrong, but can't find the answer in my docs or the posts of the last months(or there is an answer but
I didn'f find it).

So what is the usual way to download whatever(zip, rar, pdf, mpeg ...) files with cocoon?


Thanks for your help.

Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: downloading with cocoon problem

Posted by Hubert Holtz <Tu...@gmx.net>.
Hy Alex,

I don't think that the path is the problem, at least I hope so, but my
webapp directory in tomcat  is called "test"(which includes the webinf directory of cocoon)
so the path should be correct, but thanks anyway for your help.

Is there anybody out there who knows what the problem could be?


Steve

*********** REPLY SEPARATOR  ***********

On 22.05.2003 at 12:59 Alexander Schatten wrote:

>Hubert Holtz wrote:
>
>>Hy all,
>>
>>After reading some posts here about the ResourceReader I thought I would
>know how to manage downloads, but
>>I think I miss some points to get it running.
>>
>>Here is my sitemap:
>>
>><!-- *************READERS***************-->
>>	
>>	<map:readers default="resource">
>>		<map:reader name="resource"
>src="org.apache.cocoon.reading.ResourceReader"/>
>>		<map:reader name="jsp" src="org.apache.cocoon.reading.JSPReader"/>
>>	</map:readers>
>>...
>>
>><!-- downloads -->
>>
>>		<map:match pattern="download/*.pdf">
>>			<map:read mime-type="application/pdf" src="download/{1}.pdf"/>
>>		</map:match>
>>
>>I hav a link which is the following:
>http://localhost:8080/test/download/d.pfd
>>But if I try to load the pdf I just get an "resource not found" error.
>>
>>  
>>
>I am not sure how the configuration is in detail, but what about the 
>/test/ in the path? and /cocoon/ is missing; I do not know how you 
>configured tomcat and cocoon, but in standard configuration I would 
>assume, this pattern should match (when test is the project name, and is 
>a folder below the cocoon folder)
>
>http://localhost:8080/cocoon/test/download/d.pfd
>
>
>Alex
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: downloading with cocoon problem

Posted by Alexander Schatten <al...@gmx.at>.
Hubert Holtz wrote:

>Hy all,
>
>After reading some posts here about the ResourceReader I thought I would know how to manage downloads, but
>I think I miss some points to get it running.
>
>Here is my sitemap:
>
><!-- *************READERS***************-->
>	
>	<map:readers default="resource">
>		<map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"/>
>		<map:reader name="jsp" src="org.apache.cocoon.reading.JSPReader"/>
>	</map:readers>
>...
>
><!-- downloads -->
>
>		<map:match pattern="download/*.pdf">
>			<map:read mime-type="application/pdf" src="download/{1}.pdf"/>
>		</map:match>
>
>I hav a link which is the following: http://localhost:8080/test/download/d.pfd
>But if I try to load the pdf I just get an "resource not found" error.
>
>  
>
I am not sure how the configuration is in detail, but what about the 
/test/ in the path? and /cocoon/ is missing; I do not know how you 
configured tomcat and cocoon, but in standard configuration I would 
assume, this pattern should match (when test is the project name, and is 
a folder below the cocoon folder)

http://localhost:8080/cocoon/test/download/d.pfd


Alex


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org