2 Replies Latest reply: Jan 30, 2013 11:34 AM by Gabino RSS

    Show Images ADF from PATH

      Hi all, I have this problem to show a image in ADF.
      I need show an image I have in my aplicattion (Web Content/Images), this images is based in the employee_id for example the name of image is 100.jpg, 200.jpg.
      How I can load this images NOT from database, but from PATH in the application?? for example when employees_id = 100 show image from this employee, when the employees_id = 200 show image from this employee. This images must be loaded from path in the application containing all employee's images.

      Thanks for all!!
        • 1. Re: Show Images ADF from PATH
          Timo Hahn
          There are two possible solutions:
          1) the imanges you want to show are under the web root of you application. in this case you can use the image tag and use EL to build the right path to show
          2) the image files are somewhere else. In this case you can't use the image tag in this way. You can however adopt the wokrflow outlined in my blog http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/ (which you already know). Here you change the way the data is read (in the sample it's read from the DB) in a way that you read the data from the file. In the servlet you have access to the file path and you only need to add the empId and '.jpg' to get the full name. The you open the file and stream in to the outpoutstream. There is no need to use a BlobDomain in this case. This is done in the sample just because the images are read from the db.

          • 2. Re: Show Images ADF from PATH
            Yes, thanks Timo with the one option I can do. With the option Two I have not tried to do yet, but I try leter

            Thanks a lot!!