6 Replies Latest reply: Jan 31, 2013 2:51 AM by Joonas Linkola RSS

    ADF faces upload file

    985680
      Hello All ,
      I am using JDeveloper 11.1.2.3.0 , and I want to use upload file in my application. In ADF developer's guide 10g there is a section called providing file upload capability but in the new developer guide there is no such thing.
      I want to ask you if anyone knows if it is the same for the new JDeveloper or not. I f I configure my application as written in the old developer's guide things will work fine or not. And please if anyone knows how to configure it please tell me. + do I need to implement a servlet java class or ADF handles that automatically ??

      Thanks a lot

      FARAJ
        • 1. Re: ADF faces upload file
          Santosh M E
          Hi,

          _http://tompeez.wordpress.com/tag/afinputfile/

          -Santosh
          • 2. Re: ADF faces upload file
            Joonas Linkola
            There's a short introduction to file uploading in the Web Developer's Guide: http://docs.oracle.com/cd/E24382_01/web.1112/e16181/af_input.htm#BABDFAEI

            You can find several tutorials for creating upload functionality in 11g on the web, see for instance http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-2/

            Hope these help,

            Joonas
            • 3. Re: ADF faces upload file
              985680
              Thanks a lot ,
              I want to save my file on the server and not in the DB , do you have any idea how ? someone told me that I need to specify the path in the web.xml and someone told me that I need to specify it in the bean.

              Any idea ?

              thanks
              • 4. Re: ADF faces upload file
                985680
                Thanks a lot ,
                I want to save my file on the server and not in the DB , do you have any idea how ? someone told me that I need to specify the path in the web.xml and someone told me that I need to specify it in the bean.

                Any idea ?

                thanks
                • 5. Re: ADF faces upload file
                  user404
                  I think this might help you:
                  http://adf4beginners.blogspot.be/2012/11/upload-specific-file-types-images-only.html

                  Edit:
                  This writes the uploaded file (images in the example, which can easily be changed) to your WLS.
                  • 6. Re: ADF faces upload file
                    Joonas Linkola
                    You can write the file to disk using standard Java I/O, if you like. As for the path it's probably best to store it as a context parameter rather than hardcoding it to the bean. See for instance: http://stackoverflow.com/questions/6187296/how-to-set-a-parameter-for-a-java-web-application