You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jan Wielgus <li...@o2.pl> on 2003/11/16 11:49:07 UTC

Reading and passing parameters in the sitemap

Hello,

here a sniplet from my sitemap:

<map:pipeline>
 <map:match pattern="upload/*">
  <map:act type="multipart">
        <map:parameter name="upload-dir"
value="e:/cocoon-2.1.2/build/webapp/LetterMan/grafiken/{1}/"/>
        <map:redirect-to
uri="../main.xsp?dir=grafiken&amp;site=grafiken-upload-ok.xsp"/>
  </map:act>
        <map:redirect-to uri="serverpages"
src="../main.xsp?dir=grafiken&amp;site=grafiken-upload-fail.xsp"/>
 </map:match>
</map:pipeline>

and this is and excerpt from my xsl file where i have the form for
file uploading:

<form action="upload/upload" method="post"
enctype="multipart/form-data">
<table class="list" align="center">
<tr><td class="list" width="500" colspan="2"></td></tr>
<tr><td class="list" colspan="2">Name: <input type="text"
name="gr_name"/></td></tr>
<tr><td class="list" colspan="2">Datei: <input type="file"
name="gr_upload"/></td></tr>
<tr><td class="list" colspan="2"><hr align="center" width="100%"
color="#663300"/></td></tr>
<tr><td class="list"><input type="submit" name="action"
value="Upload"/></td></tr>
</table>
</form>

so, the form action goes to the pipeline which I showed above. Now I
have the following problem: I would like to pass the parameter
"gr_name" to the redirect-uri which is used in the pipeline. How to
do this? Furthermore - I would like to pass the path of the saved
file there, are there any possibilities to do this?

Any help would be appreciated

Regards

Jan

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


Re: Reading and passing parameters in the sitemap

Posted by Stefan Klein <kl...@web.de>.
Jan,

> have the following problem: I would like to pass the parameter
> "gr_name" to the redirect-uri which is used in the pipeline. 
Use input modules. The RequestParameterModule lets you do exactly that.
Just put {request-param:gr_name} into the redirect-uri.

(Also see http://wiki.cocoondev.org/Wiki.jsp?page=InputModules)


> Furthermore - I would like to pass the path of the saved
> file there, are there any possibilities to do this?
Would the pass not simply be
"e:/cocoon-2.1.2/build/webapp/LetterMan/grafiken/{1}/" as you as
parameter to the action? Or maybe
"e:/cocoon-2.1.2/build/webapp/LetterMan/grafiken/{1}/{request-param:gr_n
ame}" if you want the path+filename. If not, get back to me.

Stefan

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