cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Geindre <>
Subject different behavior between jetty and tomcat deployment...
Date Tue, 05 Feb 2008 18:22:26 GMT
hello everybody,

i work with C2.2, and tomcat 5.5

i have a simple sitemap with streamgenerator
     <map:match pattern="GET">
        <map:generate type="stream">
          <map:parameter name="form-name" value="myrequest"/>

        <map:serialize type="xml"/>

when i run this with jetty; i could test it with curl and post xml data
curl -v  -F "myrequest=@file.xml"  http://myMachine:8888/myUri/GET
it returns the xml data of my file file.xml

when i deploy it in apache and test with curl
curl -v  -F "myrequest=@file.xml"  
cocoon raise an exception and said that myrequest parameter is not set !!!

org.apache.cocoon.ProcessingException: Unknown request object 
encountered named gwprequest : null

Any idea what's going on with tomcat deployement ???

it seems that request.get("myrequest") gives null with tomcat.....

thank you.

in the generator code
                   if (contentType
contentType.startsWith("multipart/form-data")) {
                        String parameter = 
                        if (parameter == null) {
                            throw new ProcessingException(
                                    "StreamGenerator expects a sitemap 
parameter called '"
                                            + FORM_NAME
                                            + "' for handling form data");
                        Object xmlObject = request.get(parameter);
                        Reader xmlReader = null;
                        if (xmlObject instanceof  String) {
                            xmlReader = new StringReader((String) 
                        } else if (xmlObject instanceof  Part) {
                            xmlReader = new InputStreamReader(
                                    ((Part) xmlObject).getInputStream());
                        } else {
                            throw new ProcessingException(
                                    "Unknown request object encountered 
named "
                                            + parameter + " : " + 

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

View raw message