1 Reply Latest reply on Feb 21, 2011 12:21 AM by ananymous7239

    Image Uploading in Project WAR File

    Ambrish Singh Newbie

      Hi Everyone,

      I have to upload User's image for every user.Everything is working fine and images are uploaded. But everytime the image path i am giving is specific to my local system.

      Is it possible that the uploaded images go into /ProjectName/view/img folder of project and easily accessible as other images of /ProjectName/view/img folder are accessible ,so that they are not dependent on local system ?.

      Thanks & Regards


        • 1. Re: Image Uploading in Project WAR File
          ananymous7239 Newbie

          Hi Ambrish i want to save 5 uploaded images as 5 records in Database
          .you have any idea about this please help me .i am able to save only the last upload 
          image. this is my persist method
               @Begin(join = true)
               public String persist() {
                    try {
                         BeanUtils.copyProperties(getInstance(), doImageUpload);
                         for (int num = 0; num < files.size(); num++) {
                              log.info("...............files in persist"+files.get(num).getLength());
                              log.info("...............files in persist"+files.size());
                              log.info("...............files in persist"+files.get(num).getData());
                    } catch (Exception e) {
                         log.info("exception" + e);
                    return "done";