cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: different upload-dirs for different applications
Date Tue, 30 Sep 2003 12:06:41 GMT

returning a bit of help perhaps: i could not solve the problem by myself

[1] dummy thing: i supposed that the HTML-FORM-ACTION "upload" was a
standarized thing i should not change. i was wrong of course. 

[2] harder: i supposed -- since all examples i found did that -- that the
generator "request" was necessary in some way. so i did not dare to remove

perhaps those two points could be mentioned in the wiki.. 

thanks a lot!


Original Message:
From: Geoff Howard
Date: Tue, 30 Sep 2003 07:45:26 -0400
Subject: Re: different upload-dirs for different applications wrote:
> first -- pleast excuse my bad quoting. mail2web does not support better.


>   <map:match pattern="uploadFileFromUser">
>     <map:act type="upload-files"/>
>     <map:generate type="request">
>     <map:read src="new-samples/success.html" mime-type="text/html"/>
>     </map:generate>
>   </map:match>

This pipeline is not valid.
1) You either use a reader or generator-[transformer*]-serializer but 
not both.  That's probably why you get the error about no pipeline 
matching -- it means no valid pipeline.  So:

    <map:match pattern="uploadFileFromUser">
      <map:act type="upload-files"/>
      <map:read src="new-samples/success.html" mime-type="text/html"/>

is a step better.  But:

2) Your pipeline will send success.html whether upload-files action 
succeeds or not.  So:

    <map:match pattern="uploadFileFromUser">
      <map:act type="upload-files">
        <map:read src="new-samples/success.html" mime-type="text/html"/>
      <map:read src="new-samples/failure.html" mime-type="text/html"/>

Is probably better.

You of course have to create a failure.html.  Remember: if an action 
returns any Map (even an empty one) this tells the sitemap to execute 
the nested pipeline fragments if any.  If a complete pipeline is found 
within it (a reader is a complete pipeline), pipeline assembly is fixed 
without moving on.  If null is returned from the action, only non-nested 
fragments are assembled into the final pipeline.  You must take care to 
ensure that a complete valid pipeline is assembled no matter what 
different actions signal.  Remember also: actions along with matchers 
and selectors are executed before generation begins during pipeline setup.


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

mail2web - Check your email from the web at .

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

View raw message