cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geert Josten" <geert.jos...@daidalos.nl>
Subject RE: How to use stream generator to get multipart/form-data POST value
Date Sat, 15 Sep 2007 17:46:05 GMT
As an alternative, you could prefix the target field name with 'xml:'
and use the request generator.

If you don't specify parameters on the stream generator, it tries to
process the request body. But how to get XML in the body with a html
submit form?

HTH,
Geert

> 
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen,
verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
 

> From: Flutina.Zhu [mailto:flutina@gmail.com] 
> Sent: donderdag 13 september 2007 12:19
> To: users@cocoon.apache.org
> Subject: How to use stream generator to get 
> multipart/form-data POST value
> 
> hi, all
>  
> I met a problem with stream generator.
>  
> I submit a form as
>  
> <form id="uploadForm" dojoAttachPoint="uploadFormNode" 
> method="post" enctype="multipart/form-data" action="upload.xml">
>    ...
>    <input name="target" id="target" name="target" type="file"/>
>    ...
> </form>
>  
> So in the sitemap it as follow:
>  
>       <map:generate type="stream">
>           <map:parameter name="form-name" value="target"/>
>           <map:parameter name="defaultContentType" 
> value="multipart/form-data"/> 
>         </map:generate>
>  
> but I get the error like : 
> Exception in StreamGenerator.generate(): 
> java.lang.NullPointerException
>  
> So what's wrong with my code? the "target" is a well-format xml file.
> Anybody can help me?
>  
> -flutina
>

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


Mime
View raw message