title: Liferay portlet configuration
body: <p>I'm trying to  personalize the configuration of a Liferay portlet.</p>
  
  <p>configuration.jsp is:</p>
  
  <pre><code>&lt;%@include file="/init.jsp" %&gt;
  
  &lt;liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" /&gt;
  
  &lt;%
  boolean showLocationAddress_cfg = GetterUtil.getBoolean(portletPreferences.getValue("showLocationAddress", StringPool.TRUE));
  %&gt;
  
  &lt;aui:form action="&lt;%= configurationURL %&gt;" method="post" name="fm"&gt;
      &lt;aui:input name="&lt;%= Constants.CMD %&gt;" type="hidden" value="&lt;%= Constants.UPDATE %&gt;" /&gt;
  
      &lt;aui:input  name="preferences--showLocationAddress--" type="checkbox" value="&lt;%= showLocationAddress_cfg %&gt;" /&gt;
      &lt;aui:input key="mailAddress" type="text" name="preferences--mailAddress--"/&gt;
      &lt;aui:button-row&gt;
         &lt;aui:button name="save-Boutton" type="submit" value="Save"/&gt;
      &lt;/aui:button-row&gt;
  &lt;/aui:form&gt;
  </code></pre>
  
  <p>ConfigurationActionImpl.java is:</p>
  
  <pre><code>package com.nosester.portlet.eventlisting.action;
  
  import javax.portlet.ActionRequest;
  import javax.portlet.ActionResponse;
  import javax.portlet.PortletConfig;
  import javax.portlet.PortletPreferences;
  
  import com.liferay.portal.kernel.portlet.DefaultConfigurationAction;
  import com.liferay.portal.kernel.servlet.SessionErrors;
  import com.liferay.portal.kernel.servlet.SessionMessages;
  import com.liferay.portal.kernel.util.Constants;
  import com.liferay.portal.kernel.util.ParamUtil;
  import com.liferay.portlet.PortletPreferencesFactoryUtil;
  
      public class ConfigurationActionImpl extends DefaultConfigurationAction {
  
          @Override
          public void processAction(
              PortletConfig portletConfig, ActionRequest actionRequest,
              ActionResponse actionResponse) throws Exception {
  
              super.processAction(portletConfig, actionRequest, actionResponse);
  
             PortletPreferences prefs = actionRequest.getPreferences();
  
  
              String mailAddress=prefs.getValue("mailAddress", "default");
  
  
             System.out.println("address mail= "+mailAddress);
          }
  </code></pre>
  
  <p>But in all cases the mail address displayed is:  default.</p>
  
  <p>Can someone help me to correct this code in order it can display what the user put in the text field?</p>