7 Replies Latest reply on Aug 31, 2010 3:27 AM by Anders Åberg

    ConversationScoped controller, getting new conversation after a file upload

    Anders Åberg Newbie

      Hi guys

      I am having a weird problem with a @ConversationScoped controller. We are using Primefaces and it has a file upload component
      that is using flash to upload binaries. Our first problem with this was that it was not propagating the JSESSIONID correctly,
      and we got exceptions after submit: View /fileupload.xhtml could not be restored. But, we managed to fix this so that both
      the cid parameter and the jsessionid is passed to the server, like this:


      Now the submit works and the file is uploaded, but in a new conversation of our controller. We are displaying the cid in our
      form, and if the cid is 2 on the first request, it will be 3 after submitting.

      So the problem is that the file ends up in a new conversation and not in the original conversation.

      I don't know how to debug this further, I have replicated the problem on both Tomcat 7.0 Beta 1,Glassfish 3.0.0 and 3.0.1,
      and I cannot find any log message from Weld during this.

      Any suggestions? All help would be greatly appreciated. I have made a really simple project with one template and one controller,
      and a war that can be deployed in Tomcat. Will upload these somewhere if anyone is willing to help.