title: Servlet : doGet and doPost
body: <p>I have 2 parameters, <code>User</code> and <code>Pass</code>. I want to send them to a servlet. </p>
  
  <p>If I use the doGet method of the servlet it would look like this :</p>
  
  <pre><code>"link?User="+TextFieldValue+"&amp;pass"textFieldValue
  
  user= UserName.getValue();
  pass= password.getValue();
  
  Resource newPictureResource = new ExternalResource("http://localhost:8888/PieChart?UserName="+name+"&amp;Password="+pass);
  Success.setSource(newPictureResource);
  editContent.addComponent(Success);
  </code></pre>
  
  <p>send them to servlet :</p>
  
  <pre><code>    String UserName = request.getParameter("UserName");
      String Password = request.getParameter("Password");
  </code></pre>
  
  <p>It works (tested)</p>
  
  <p>If the <code>Username</code> + <code>pass</code> are right then he get a "success" picture posted on the screen.</p>
  
  <p>But nobody passes the parameters via URL.</p>
  
  <p>My question: How do I send the parameters using <code>doPost</code> method of the servlet ?</p>
  
  <p>info : im working with eclipse on a liferay portal with a Vaadin portlet.</p>