1. Juan Carlos Picado Herrera
  2. encuestame

Commits

Juan Carlos Picado Herrera  committed 16667d1 Merge

Merge branch 'juanpicado' into development

  • Participants
  • Parent commits d2ee5b9, 0f9fb58
  • Branches master

Comments (0)

Files changed (23)

File .gitignore

View file
  • Ignore whitespace
 *~
 target/
 */.settings
-*DEADJOE*
+*DEADJOE*
+encuestame-war/src/main/webapp/resource/js/dijit/
+encuestame-war/src/main/webapp/resource/js/dojox/
+encuestame-war/src/main/webapp/resource/js/dojo/

File encuestame-business/src/main/java/org/encuestame/business/service/ApplicationServices.java

View file
  • Ignore whitespace
 import org.encuestame.business.service.imp.IChartService;
 import org.encuestame.business.service.imp.IFrontEndService;
 import org.encuestame.business.service.imp.ILocationService;
+import org.encuestame.business.service.imp.IPictureService;
 import org.encuestame.business.service.imp.IPollService;
 import org.encuestame.business.service.imp.IProjectService;
 import org.encuestame.business.service.imp.ISecurityService;
     private IChartService chartService;
     /** {@link FrontEndService}. **/
     private IFrontEndService frontEndService;
+    /** {@link PictureService}. **/
+    private IPictureService pictureService;
 
     /**
      * @return the securityService
     public void setFrontEndService(final IFrontEndService frontEndService) {
         this.frontEndService = frontEndService;
     }
+
+    /**
+     * @return the pictureService
+     */
+    public IPictureService getPictureService() {
+        return pictureService;
+    }
+
+    /**
+     * @param pictureService the pictureService to set
+     */
+    public void setPictureService(IPictureService pictureService) {
+        this.pictureService = pictureService;
+    }
 }

File encuestame-business/src/main/java/org/encuestame/business/service/PictureService.java

View file
  • Ignore whitespace
+/*
+ ************************************************************************************
+ * Copyright (C) 2001-2011 encuestame: system online surveys Copyright (C) 2009
+ * encuestame Development Team.
+ * Licensed under the Apache Software License version 2.0
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to  in writing,  software  distributed
+ * under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR
+ * CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  for  the
+ * specific language governing permissions and limitations under the License.
+ ************************************************************************************
+ */
+package org.encuestame.business.service;
+
+import java.io.File;
+
+import org.encuestame.business.service.imp.IPictureService;
+
+/**
+ * Picture / Image Service.
+ * @author Picado, Juan juanATencuestame.org
+ * @since Jan 16, 2011 4:12:19 PM
+ * @version $Id:$
+ */
+public class PictureService extends AbstractBaseService implements IPictureService{
+
+    /**
+     * Picure Path.
+     */
+    private String picturePath;
+
+    /**
+     * @return the picturePath
+     */
+    public String getPicturePath() {
+        return picturePath;
+    }
+
+    /**
+     * Get Profile Picture.
+     * @param id
+     * @param username
+     * @param pictureType
+     * @return
+     */
+    public byte[] getProfilePicture(
+            final String id,
+            final String username,
+            final PictureType pictureType){
+        final String url = getAccountUserPicturePath(username);
+        final File file = new File(url + "3261353607_3bf3a23053_o.jpg");
+
+        return null;
+
+    }
+
+    /**
+     * Return real path folder for user account.
+     * @return
+     */
+    public String getAccountUserPicturePath(final String username){
+        //TODO: should be real user account path.
+        return this.getPicturePath();
+    }
+
+    /**
+     * @param picturePath the picturePath to set
+     */
+    public void setPicturePath(final String picturePath) {
+        this.picturePath = picturePath;
+    }
+
+    public enum PictureType {
+        THUMBNAIL, DEFAULT, PREVIEW, WEB;
+    }
+}

File encuestame-business/src/main/java/org/encuestame/business/service/imp/IApplicationServices.java

View file
  • Ignore whitespace
      * @param frontEndService the frontEndService to set
      */
     void setFrontEndService(final IFrontEndService frontEndService);
+
+    IPictureService getPictureService();
+
+    void setPictureService(IPictureService pictureService);
 }

File encuestame-business/src/main/java/org/encuestame/business/service/imp/IPictureService.java

View file
  • Ignore whitespace
+/*
+ ************************************************************************************
+ * Copyright (C) 2001-2011 encuestame: system online surveys Copyright (C) 2009
+ * encuestame Development Team.
+ * Licensed under the Apache Software License version 2.0
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to  in writing,  software  distributed
+ * under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR
+ * CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  for  the
+ * specific language governing permissions and limitations under the License.
+ ************************************************************************************
+ */
+package org.encuestame.business.service.imp;
+
+import org.encuestame.business.service.PictureService.PictureType;
+
+/**
+ * Description Class.
+ * @author Picado, Juan juanATencuestame.org
+ * @since Jan 16, 2011 4:12:57 PM
+ * @version Id:
+ */
+public interface IPictureService {
+
+
+    /**
+     * Return real path folder for user account.
+     * @return
+     */
+    String getAccountUserPicturePath(final String username);
+
+    /**
+     * Get Profile Picture.
+     * @param id
+     * @param username
+     * @param pictureType
+     * @return
+     */
+    byte[] getProfilePicture(
+            final String id,
+            final String username,
+            final PictureType pictureType);
+}

File encuestame-business/src/main/resources/encuestame-service-context.xml

View file
  • Ignore whitespace
 
   <bean id="locationService" class="org.encuestame.business.service.LocationService" parent="service"/>
 
+  <bean id="pictureService" class="org.encuestame.business.service.PictureService" parent="service">
+        <property name="picturePath" value="${application.picture.path}"/>
+  </bean>
+
   <bean id="applicationServices" class="org.encuestame.business.service.ApplicationServices" parent="service">
     <property name="securityService">
       <ref bean="securityService"></ref>
     <property name="frontEndService">
          <ref bean="frontEndService"/>
     </property>
+    <property name="pictureService">
+         <ref bean="pictureService"/>
+    </property>
   </bean>
 
   <!--

File encuestame-mvc/src/main/java/org/encuestame/mvc/controller/BaseController.java

View file
  • Ignore whitespace
 import org.encuestame.business.service.ServiceManager;
 import org.encuestame.business.service.TweetPollService;
 import org.encuestame.business.service.imp.ILocationService;
+import org.encuestame.business.service.imp.IPictureService;
 import org.encuestame.business.service.imp.IPollService;
 import org.encuestame.business.service.imp.IProjectService;
 import org.encuestame.business.service.imp.ISecurityService;
 
      protected Logger log = Logger.getLogger(this.getClass());
 
-      public static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat(DateUtil.DEFAULT_FORMAT_DATE);
+     public static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat(DateUtil.DEFAULT_FORMAT_DATE);
 
-      public static final SimpleDateFormat SIMPLE_TIME_FORMAT = new SimpleDateFormat(DateUtil.DEFAULT_FORMAT_TIME);
+     public static final SimpleDateFormat SIMPLE_TIME_FORMAT = new SimpleDateFormat(DateUtil.DEFAULT_FORMAT_TIME);
 
      /**
       * {@link ReCaptcha}.
     }
 
     /**
+     * Get Picture Service.
+     * @return
+     */
+    public IPictureService getPictureService(){
+        return getServiceManager().getApplicationServices().getPictureService();
+    }
+
+    /**
      * @return the authenticationManager
      */
     public AuthenticationManager getAuthenticationManager() {

File encuestame-mvc/src/main/java/org/encuestame/mvc/controller/FileUploadController.java

View file
  • Ignore whitespace
+/*
+ ************************************************************************************
+ * Copyright (C) 2001-2011 encuestame: system online surveys Copyright (C) 2009
+ * encuestame Development Team.
+ * Licensed under the Apache Software License version 2.0
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to  in writing,  software  distributed
+ * under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR
+ * CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  for  the
+ * specific language governing permissions and limitations under the License.
+ ************************************************************************************
+ */
+package org.encuestame.mvc.controller;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.encuestame.core.util.MD5Utils;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.view.json.MappingJacksonJsonView;
+
+/**
+ * Upload File Controller.
+ * @author Picado, Juan juanATencuestame.org
+ * @since Jan 16, 2011 11:47:33 AM
+ * @version $Id:$
+ */
+@Controller
+public class FileUploadController extends BaseController {
+
+    /**
+     * Upload Profile for User Account.
+     * @param multipartFile
+     * @return
+     */
+    @RequestMapping(value = "/user/profile/file/upload", method = RequestMethod.POST)
+    public ModelAndView handleUserProfileFileUpload(
+            @RequestParam("file") MultipartFile multipartFile) {
+        ModelAndView mav = new ModelAndView(new MappingJacksonJsonView());
+        if (!multipartFile.isEmpty()) {
+            log.debug(multipartFile.getName());
+            String orgName = multipartFile.getOriginalFilename();
+            log.debug("org name "+orgName);
+            //TODO: convert name to numbers, MD5 hash.
+            final String filePath = MD5Utils.shortMD5(getPictureService().getAccountUserPicturePath("FAKE") + orgName);
+            try {
+                //TODO: replace FAKE by getUserAuthenticationUsername
+                log.debug("org filePath "+filePath);
+                final File dest = new File(filePath);
+                log.debug("dest  "+dest);
+                multipartFile.transferTo(dest);
+                log.debug("transferTo after");
+                //TODO: after save image, we need relationship user with profile picture.
+                //I suggest store ID on user account table, to retrieve easily future profile image.
+                //BUG 102
+            } catch (IllegalStateException e) {
+                e.printStackTrace();
+                log.error("File uploaded failed:" + orgName);
+            } catch (IOException e) {
+                e.printStackTrace();
+                log.error("File uploaded failed:" + orgName);
+            }
+            // Save the file here
+            mav.addObject("status", "saved");
+            mav.addObject("id", filePath);
+        } else {
+            mav.addObject("status", "failed");
+        }
+        return mav;
+    }
+
+    /**  TODO: we can add more methods to upload different types of files. **/
+}

File encuestame-mvc/src/main/java/org/encuestame/mvc/controller/PictureProfileFactoryController.java

View file
  • Ignore whitespace
+/*
+ ************************************************************************************
+ * Copyright (C) 2001-2011 encuestame: system online surveys Copyright (C) 2009
+ * encuestame Development Team.
+ * Licensed under the Apache Software License version 2.0
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to  in writing,  software  distributed
+ * under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR
+ * CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  for  the
+ * specific language governing permissions and limitations under the License.
+ ************************************************************************************
+ */
+package org.encuestame.mvc.controller;
+
+import org.encuestame.business.service.PictureService.PictureType;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+/**
+ * Render Image.
+ * @author Picado, Juan juanATencuestame.org
+ * @since Jan 16, 2011 3:56:50 PM
+ * @version Id:
+ */
+@Controller
+public class PictureProfileFactoryController extends BaseController {
+
+    /**
+     * Returns the byte[] that contains the requested thumbnail image (128x128 constrained).
+     * @param id The identifier of the image
+     * @return A byte[] that contains the requested image
+     */
+    @RequestMapping( value = "/user/picture/{username}/thumbnail/{id}", method = RequestMethod.GET )
+    @ResponseBody
+    public byte[] getPictureThumbnail(
+            @PathVariable String id,
+            @PathVariable String username ){
+        return getPictureService().getProfilePicture(id, username, PictureType.THUMBNAIL);
+    }
+
+    /**
+     * Returns the byte[] that contains the requested master image.
+     * @param id The identifier of the image
+     * @return A byte[] that contains the requested image
+     */
+    @RequestMapping( value = "/user/picture/{username}/default/{id}", method = RequestMethod.GET )
+    @ResponseBody
+    public byte[] getPictureMaster(
+            @PathVariable String id,
+            @PathVariable String username ){
+        return getPictureService().getProfilePicture(id, username, PictureType.DEFAULT);
+    }
+
+    /**
+     * Returns the byte[] that contains the requested preview image (800x800 constrained)
+     * @param id The identifier of the image
+     * @return A byte[] that contains the requested image
+     */
+    @RequestMapping( value = "/user/picture/{username}/preview/{id}", method = RequestMethod.GET)
+    @ResponseBody
+    public byte[] getPicturePreview(
+            @PathVariable String id,
+            @PathVariable String username ){
+        return getPictureService().getProfilePicture(id, username,  PictureType.PREVIEW);
+    }
+
+    /**
+     * Returns the byte[] that contains the requested web image (500x500 constrained)
+     * @param id  The identifier of the image
+     * @return A byte[] that contains the requested image
+     */
+    @RequestMapping( value = "/user/picture/{username}/web/{id}", method = RequestMethod.GET)
+    @ResponseBody
+    public byte[] getPictureWeb(
+            @PathVariable String id,
+            @PathVariable String username  ){
+        return getPictureService().getProfilePicture(id, username, PictureType.WEB);
+    }
+
+}

File encuestame-mvc/src/main/resources/encuestame-controller-context.xml

View file
  • Ignore whitespace
     Enables annotated @Controllers; responsible for invoking an annotated
     POJO @Controller when one is mapped.
   -->
-  <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>
+  <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
+        <!--
+            NOTE: it is important to specify the order property, so this
+            adapter will be attempted before the HandlerAdapter that
+            Spring MVC automatically configures. This is because a
+            MappingJacksonHttpMessageConverter is registered
+            automatically with the default adapter that will attempt to
+            handle any Java object including BufferedImage.
+        -->
+        <property name="messageConverters">
+            <list>
+                <!-- Default converters -->
+                <bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
+                <bean class="org.springframework.http.converter.FormHttpMessageConverter"/>
+                <bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter">
+                    <property name="supportedMediaTypes">
+                        <list>
+                            <value>image/jpeg</value>
+                        </list>
+                    </property>
+                </bean>
+                <bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter"/>
+
+                <!-- Converter for images -->
+                <bean class="org.springframework.http.converter.BufferedImageHttpMessageConverter"/>
+
+                <!-- Handle JAXB XML objects
+                <bean id="marshallingHttpMessageConverter"
+                 class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
+                    <constructor-arg>
+                        <bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
+                            <property name="classesToBeBound">
+                                <list>
+                                    <value>PictureFolders</value>
+                                    <value>Pictures</value>
+                                </list>
+                            </property>
+                        </bean>
+                    </constructor-arg>
+                </bean> -->
+
+                <!-- This must come after our image converter -->
+                <bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"/>
+            </list>
+        </property>
+  </bean>
 
 </beans>

File encuestame-persistence/src/main/java/org/encuestame/persistence/domain/security/UserAccount.java

View file
  • Ignore whitespace
     /**
      * @return username
      */
-    @Column(name = "username", nullable = false, length = 16)
+    @Column(name = "username", nullable = false, length = 30)
     public String getUsername() {
         return this.username;
     }

File encuestame-persistence/src/main/resources/encuestame-config.properties

View file
  • Ignore whitespace
 application.encoding = UTF-8
 application.apiKeygoogle = ${google.maps.key}
 application.domain = http://localhost:8080/
-
+application.picture.path = ${picture.path}
 application.flow.path=/WEB-INF/flows
 
 #----------------------------------

File encuestame-war/src/main/resources/encuestame-mvc-context.xml

View file
  • Ignore whitespace
 
     <!-- Configures File Upload -->
     <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
-        <property name="maxUploadSize" value="500000" />
+        <!-- the maximum file size in bytes = 10MB -->
+        <property name="maxUploadSize" value="10485760" />
     </bean>
 
    <bean name="openSessionInViewInterceptor"

File encuestame-war/src/main/webapp/WEB-INF/flows/signup/profile.jsp

View file
  • Ignore whitespace
 <%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
 <%@ include file="/WEB-INF/jsp/includes/initPage.jsp" %>
 <%@ include file="/WEB-INF/jsp/includes/publicBody.jsp" %>
+<script type="text/javascript">
+    dojo.require("encuestame.org.core.commons.signup.SignupProfile");
+</script>
     <div id="mainUserWrapper">
-        <div class="form">
-            profile
-        </div>
         <form:form modelAttribute="signUpBean">
             <div class="">
-
+                <div dojoType="encuestame.org.core.commons.signup.SignupProfile"
+                     username="${signUpBean.username}"
+                     email="${signUpBean.email}"
+                     fullName="${signUpBean.fullName}">
+                </div>
 
             </div>
+            <br/>
             <input type="submit" name="_eventId_next" value="Update My Profile"/>
         </form:form>
     </div>

File encuestame-war/src/main/webapp/WEB-INF/flows/signup/signup.jsp

View file
  • Ignore whitespace
                                 <label for="username">Username</label>
                             </div>
                             <div class="form-value">
-                                <form:input path="username" size="30" maxlength="16" />
+                                <form:input path="username" size="30" maxlength="40" />
                                 <br />
                                 <form:errors path="username" cssClass="errors" />
                              </div>
                                 <label for="email">Email</label>
                             </div>
                             <div class="form-value">
-                                <form:input path="email" size="30" maxlength="25" />
+                                <form:input path="email" size="30" maxlength="80" />
                                 <br />
                                 <form:errors path="email" cssClass="errors" />
                              </div>

File encuestame-war/src/main/webapp/resource/js/encuestame.profile.js

View file
  • Ignore whitespace
                 "encuestame.org.core.commons.tweetPoll.HashTags",
                 "encuestame.org.core.commons.tweetPoll.Answers",
                 "encuestame.org.core.commons.poll.Poll",
+                "encuestame.org.core.commons.signup.SignupProfile",
                 "encuestame.org.core.commons.dashboard.Dashboard",
                 "encuestame.org.core.commons.dashboard.chart.DashboardPie",
                 "encuestame.org.core.commons.dashboard.chart.DashboardLine",

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/dashboard/Dashboard.js

View file
  • Ignore whitespace
 
         postCreate: function() {
 
-        },
+        }
     }
 );

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/dashboard/chart/DashboardColumn2D.js

View file
  • Ignore whitespace
 
         postCreate: function() {
 
-        },
+        }
     }
 );

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/dashboard/chart/DashboardLine.js

View file
  • Ignore whitespace
 
         postCreate: function() {
 
-        },
+        }
     }
 );

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/notifications/Notification.js

View file
  • Ignore whitespace
              */
             removeNotification : function(notificationId){
                 var url = '/encuestame/api/remove-notification.json';
-            },
+            }
 
 
         });

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/signup/SignupProfile.js

View file
  • Ignore whitespace
+dojo.provide("encuestame.org.core.commons.signup.SignupProfile");
+
+dojo.require("dojo.io.iframe");
+
+dojo.declare("encuestame.org.core.commons.signup.SignupProfile",
+        [dijit._Widget, dijit._Templated ], {
+    templatePath : dojo.moduleUrl("encuestame.org.core.commons.signup.", "templates/profile.inc"),
+
+    widgetsInTemplate : true,
+
+    email : '',
+
+    fullName : '',
+
+    username : '',
+
+    postCreate : function() {
+        console.debug("username", this.username);
+        console.debug("email", this.email);
+        console.debug("fullName", this.fullName);
+    },
+
+    _uploadImage : function(event){
+        this.uploadImage();
+    },
+
+    uploadImage : function() {
+        dojo.io.iframe.send({
+            form : dojo.byId("imageForm"),
+            handleAs : "html",
+            handle : function(ioResponse, args) {
+                if (ioResponse instanceof Error) {
+                    console.log("handle error: " + ioResponse);
+                } else {
+                    console.log("handle response: " + ioResponse);
+                }
+            },
+            // Callback on successful call:
+            load: function(response, ioArgs) {
+                // do something
+                // ...
+                console.log("response: " + response);
+                console.log("ioArgs: " + ioArgs);
+                // return the response for succeeding callbacks
+                return response;
+            }
+        });
+    }
+
+});

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/signup/templates/profile.inc

View file
  • Ignore whitespace
+<div class="updateProfile">
+        FORMULARIO ACTUALIZACION
+        <h1>Please upload a file</h1>
+        <form method="post" action="/encuestame/user/profile/file/upload" enctype="multipart/form-data" id="imageForm">
+              <input type="file" name="file" onkeydown="javascript:return false;"/>
+              <input type="button" value="Upload" dojoAttachEvent="onclick:_uploadImage"
+        </form>
+</div>

File profiles.xml

View file
  • Ignore whitespace
                 <mail.smtps.auth>true</mail.smtps.auth>
                 <mail.smtps.starttls.enable>true</mail.smtps.starttls.enable>
                 <mail.smtps.starttls.required>false</mail.smtps.starttls.required>
+		<!--Pictures -->
+		<picture.path>${user.home}/opt/encuestameImage/</picture.path>
             </properties>
         </profile>
         <profile>
                 <mail.smtps.auth>true</mail.smtps.auth>
                 <mail.smtps.starttls.enable>true</mail.smtps.starttls.enable>
                 <mail.smtps.starttls.required>false</mail.smtps.starttls.required>
+		<!--Pictures -->
+		<picture.path>${user.home}/opt/encuestameImage/</picture.path>
             </properties>
         </profile>
         <profile>
                 <mail.smtps.auth>true</mail.smtps.auth>
                 <mail.smtps.starttls.enable>true</mail.smtps.starttls.enable>
                 <mail.smtps.starttls.required>false</mail.smtps.starttls.required>
+		<!--Pictures -->
+		<picture.path>${user.home}/opt/encuestameImage/</picture.path>	
             </properties>
         </profile>
         <profile>
                 <mail.smtps.auth>true</mail.smtps.auth>
                 <mail.smtps.starttls.enable>true</mail.smtps.starttls.enable>
                 <mail.smtps.starttls.required>false</mail.smtps.starttls.required>
+		<!--Pictures -->
+		<picture.path>${user.home}/opt/encuestameImage/</picture.path>
             </properties>
         </profile>
         <profile>
                 <mail.smtps.auth>true</mail.smtps.auth>
                 <mail.smtps.starttls.enable>true</mail.smtps.starttls.enable>
                 <mail.smtps.starttls.required>false</mail.smtps.starttls.required>
+		<!--Pictures -->
+		<picture.path>${user.home}/opt/encuestameImage/</picture.path>
             </properties>
         </profile>
         <profile>
                 <mail.smtps.auth>true</mail.smtps.auth>
                 <mail.smtps.starttls.enable>true</mail.smtps.starttls.enable>
                 <mail.smtps.starttls.required>false</mail.smtps.starttls.required>
+		<!--Pictures -->
+		<picture.path>/home/jpicado/opt/encuestameImage/</picture.path>
             </properties>
         </profile>
         <profile>
                 <mail.smtps.auth>true</mail.smtps.auth>
                 <mail.smtps.starttls.enable>true</mail.smtps.starttls.enable>
                 <mail.smtps.starttls.required>false</mail.smtps.starttls.required>
+		<!--Pictures -->
+		<picture.path>${user.home}/opt/encuestameImage/</picture.path>
             </properties>
         </profile>
         <profile>
                 <mail.smtps.auth>true</mail.smtps.auth>
                 <mail.smtps.starttls.enable>true</mail.smtps.starttls.enable>
                 <mail.smtps.starttls.required>false</mail.smtps.starttls.required>
+		<!--Pictures -->
+		<picture.path>${user.home}/opt/encuestameImage/</picture.path>
             </properties>
         </profile>
     </profiles>
     <activeProfiles>
         <activeProfile>default</activeProfile>
     </activeProfiles>
-</profilesXml>
+</profilesXml>