You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sy...@swisscom.com on 2002/10/10 10:04:55 UTC

example in the Cocoon book

Hello,

I'm reading the Cocoon book written by Matthew and Carsten and one example in it doesn't work.

The pipeline fragment is:

1. <map:pipeline>
2.     <map:match pattern="download">
3.         <map:act type="request">
4.             <map:parameter name="parameters" value="true"/>
6.             <map:act type="resource-exists">
7.                 <map:parameter name="url" value="download/{file}"/>
8.                 <map:read src="download/{file}"/>
9.             </map:act>
10.            <map:generate src="filenotfound.xml"/>
11.            <map:transform src="filenotfound2html.xsl"/>
12.            <map:serialize/> 
13.        </map:act>
14.    </map:match>
15.</map:pipeline>

All seem to work except the line 8.
Cocoon detect that the {file} exists (line 7) but it can't read it (line 8).
It returns a HTTP error 404 (file not found).

Anyone has an idea?
How to check (debug) the value {file}?

Thank you
Sylvain

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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: example in the Cocoon book

Posted by Matthew Langham <ml...@s-und-n.de>.
The example is at the bottom of 117. The error is at the top of 118.

Matthew



-----Original Message-----
From: Bert Van Kets [mailto:bert@vankets.com]
Sent: Thursday, October 10, 2002 11:32 AM
To: cocoon-users@xml.apache.org
Subject: RE: example in the Cocoon book


What's the page of this book bug?
I want to correct the bug in the book itself.

Bert

At 11:17 10/10/2002 +0200, you wrote:
>Hi,
>
>guess what - this is a bug in the book :).
>
> >>
>8.                 <map:read src="download/{file}"/>
><<
>
>That line should read:
>
>                    <map:read src="download/{../file}"/>
>
>Matthew
>
>
>
>-----Original Message-----
>From: Sylvain.Thevoz@swisscom.com [mailto:Sylvain.Thevoz@swisscom.com]
>Sent: Thursday, October 10, 2002 10:05 AM
>To: cocoon-users@xml.apache.org
>Subject: example in the Cocoon book
>
>
>Hello,
>
>I'm reading the Cocoon book written by Matthew and Carsten and one example
>in it doesn't work.
>
>The pipeline fragment is:
>
>1. <map:pipeline>
>2.     <map:match pattern="download">
>3.         <map:act type="request">
>4.             <map:parameter name="parameters" value="true"/>
>6.             <map:act type="resource-exists">
>7.                 <map:parameter name="url" value="download/{file}"/>
>8.                 <map:read src="download/{file}"/>
>9.             </map:act>
>10.            <map:generate src="filenotfound.xml"/>
>11.            <map:transform src="filenotfound2html.xsl"/>
>12.            <map:serialize/>
>13.        </map:act>
>14.    </map:match>
>15.</map:pipeline>
>
>All seem to work except the line 8.
>Cocoon detect that the {file} exists (line 7) but it can't read it (line
8).
>It returns a HTTP error 404 (file not found).
>
>Anyone has an idea?
>How to check (debug) the value {file}?
>
>Thank you
>Sylvain
>
>---------------------------------------------------------------------
>Please check that your question  has not already been answered in the
>FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail:     <co...@xml.apache.org>
>For additional commands, e-mail:   <co...@xml.apache.org>
>
>
>---------------------------------------------------------------------
>Please check that your question  has not already been answered in the
>FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail:     <co...@xml.apache.org>
>For additional commands, e-mail:   <co...@xml.apache.org>


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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: example in the Cocoon book

Posted by Bert Van Kets <be...@vankets.com>.
What's the page of this book bug?
I want to correct the bug in the book itself.

Bert

At 11:17 10/10/2002 +0200, you wrote:
>Hi,
>
>guess what - this is a bug in the book :).
>
> >>
>8.                 <map:read src="download/{file}"/>
><<
>
>That line should read:
>
>                    <map:read src="download/{../file}"/>
>
>Matthew
>
>
>
>-----Original Message-----
>From: Sylvain.Thevoz@swisscom.com [mailto:Sylvain.Thevoz@swisscom.com]
>Sent: Thursday, October 10, 2002 10:05 AM
>To: cocoon-users@xml.apache.org
>Subject: example in the Cocoon book
>
>
>Hello,
>
>I'm reading the Cocoon book written by Matthew and Carsten and one example
>in it doesn't work.
>
>The pipeline fragment is:
>
>1. <map:pipeline>
>2.     <map:match pattern="download">
>3.         <map:act type="request">
>4.             <map:parameter name="parameters" value="true"/>
>6.             <map:act type="resource-exists">
>7.                 <map:parameter name="url" value="download/{file}"/>
>8.                 <map:read src="download/{file}"/>
>9.             </map:act>
>10.            <map:generate src="filenotfound.xml"/>
>11.            <map:transform src="filenotfound2html.xsl"/>
>12.            <map:serialize/>
>13.        </map:act>
>14.    </map:match>
>15.</map:pipeline>
>
>All seem to work except the line 8.
>Cocoon detect that the {file} exists (line 7) but it can't read it (line 8).
>It returns a HTTP error 404 (file not found).
>
>Anyone has an idea?
>How to check (debug) the value {file}?
>
>Thank you
>Sylvain
>
>---------------------------------------------------------------------
>Please check that your question  has not already been answered in the
>FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail:     <co...@xml.apache.org>
>For additional commands, e-mail:   <co...@xml.apache.org>
>
>
>---------------------------------------------------------------------
>Please check that your question  has not already been answered in the
>FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail:     <co...@xml.apache.org>
>For additional commands, e-mail:   <co...@xml.apache.org>


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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: example in the Cocoon book

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On Thursday 10 October 2002 10:04, Sylvain.Thevoz@swisscom.com wrote:
>. . .
> How to check (debug) the value {file}?
>. . .

I cannot help with your specific problem, but have you looked at the cocoon 
logs under WEB-INF/logs?

They should tell you what's happening, maybe after configuring the log levels 
in logkit.xconf.

Sometimes (but in this case I doubt it) you will also find info in the tomcat 
logs.

-Bertrand

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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: example in the Cocoon book

Posted by Matthew Langham <ml...@s-und-n.de>.
Hi,

guess what - this is a bug in the book :).

>>
8.                 <map:read src="download/{file}"/>
<<

That line should read:

                   <map:read src="download/{../file}"/>

Matthew



-----Original Message-----
From: Sylvain.Thevoz@swisscom.com [mailto:Sylvain.Thevoz@swisscom.com]
Sent: Thursday, October 10, 2002 10:05 AM
To: cocoon-users@xml.apache.org
Subject: example in the Cocoon book


Hello,

I'm reading the Cocoon book written by Matthew and Carsten and one example
in it doesn't work.

The pipeline fragment is:

1. <map:pipeline>
2.     <map:match pattern="download">
3.         <map:act type="request">
4.             <map:parameter name="parameters" value="true"/>
6.             <map:act type="resource-exists">
7.                 <map:parameter name="url" value="download/{file}"/>
8.                 <map:read src="download/{file}"/>
9.             </map:act>
10.            <map:generate src="filenotfound.xml"/>
11.            <map:transform src="filenotfound2html.xsl"/>
12.            <map:serialize/>
13.        </map:act>
14.    </map:match>
15.</map:pipeline>

All seem to work except the line 8.
Cocoon detect that the {file} exists (line 7) but it can't read it (line 8).
It returns a HTTP error 404 (file not found).

Anyone has an idea?
How to check (debug) the value {file}?

Thank you
Sylvain

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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>