1 2 Previous Next 21 Replies Latest reply on Feb 24, 2006 4:59 PM by mmieszek Go to original post
      • 15. Re: tomahawk dependency
        koen.aers

        Marcin,

        You don't have to worry about the GPD deployment. Just preserve the existing behaviour (returning a status string in case of the GPD deployment) based on the contents of a parameter you read with the servlet. If you tell me the name of the parameter and the value you expect from the GPD I will adapt the GPD deployment.

        Regards,
        Koen

        • 16. Re: tomahawk dependency
          koen.aers

          Oh and of course the url mapping should be adapted... :-)

          Cheers,
          Koen

          • 17. Re: tomahawk dependency
            mmieszek

            Great Koen :)

            Parameter is

            uploadType
            and let us assume value
            gpd
            I will not change url mappings and behavior will remain the same for gpd deployment.

            Let me know once You've added this parameter and then I will modify the servlets.

            Regards,

            Marcin

            • 18. Re: tomahawk dependency
              tom.baeyens

              marcin,

              now, i was thinking... couldn't you use

              HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
              DiskFileUpload fileUpload = new DiskFileUpload();
              List list = fileUpload.parseRequest(request);

              to use the DiskFileUpload inside of the AdminBean ?

              then you would not need a servlet.

              In case that doesn't work, i would prefer a 2 servlet approach (using a same base class for the file upload).

              let me know how it goes.

              regards, tom.

              • 19. Re: tomahawk dependency
                mmieszek

                I tried to do it the way You proposed, and as far as I remember it, FacesServlet did not intercepted correctly multipart submit and the backing bean method was not called at all. I can try again if You wish.

                Tell us what is Your final decision,

                Marcin

                • 20. Re: tomahawk dependency
                  tom.baeyens

                  if you tried, it's ok.

                  we just discussed it. you should go for the parameter approach with 1 servlet that has an if-then-else at the end. do the gpd behaviour in case no parameters are supplied and perform your desired behaviour in case a parameter is supplied. you could use a fixed hidden parameter in the form for that.

                  by defaulting to the gpd behaviour, that remains backwards compatible... until we introduce security :-(

                  regards, tom.

                  • 21. Re: tomahawk dependency
                    mmieszek

                    I changed ProcessUploadServlet so that the old UploadServelt in not necessary.

                    Koen, there is no need to set a parameter in gps because the distinction is basen on the request uri. I have not remove UploadServlet from the repository yet, please test if everythinh works.

                    I hope it is ok now.

                    Marcin

                    1 2 Previous Next