title: Send a POST method from liferay portlet
body: <p>I have just made a portlet with web service for liferay to learn how it works. It's working fine, and the GET method via http is also working, although throwing exception because the database is empty, but it's ok. </p>
  
  <p>So what I'm trying now is to full the data base from the same portlet by editing my view.jsp.</p>
  
  <p>My question is, how or where should I put my code in the jsp to send a POST request to add a row in the database? I'd like to use the aui to show a field and a button, so that you write what you want to insert, click submit, and send the POST Request.</p>
  
  <pre class="lang-jsp prettyprint-override"><code>&lt;%@ page import="javax.portlet.PortletPreferences" %&gt;
  &lt;%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %&gt;
  &lt;%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %&gt;
  
  &lt;portlet:defineObjects /&gt;
  
  &lt;% 
  PortletPreferences prefs = renderRequest.getPreferences(); 
  String name = (String)prefs.getValue("name", "Employee name");  
  %&gt;
  
  Please insert you new &lt;b&gt;Employee&lt;/b&gt; name.
  
  &lt;form method="post"&gt;
  &lt;aui:form method="post"&gt;
  &lt;aui:input label="New Employee: " name="name" type="text" value="&lt;%=name%&gt;"/&gt; 
  &lt;aui:button type="submit" /&gt; 
  &lt;/aui:form&gt; 
  &lt;/form&gt;
  </code></pre>
  
  <p>This code is showing correctly the button and the field. I just want to know where I have to put the code and how, to send this request and store something in the DB:</p>
  
  <pre><code>serviceClassName:xxx.service.XServiceUtil
  
  serviceMethodName:methodName
  
  servletContextName:X-portlet
  
  serviceParameters:["param1","paramN"]
  
  param1:n
  
  paramN:m
  </code></pre>
  
  <p>The web service is built and working.</p>
  
  <p>Thank you very much,</p>
  
  <p>Rafa</p>