title: setProperty value from requested getParameter
body: <p>I want to give property <code>"host"</code> the value of the requested parameter <code>"ip"</code>, submitted using method Get in <code>form.html</code></p>
  
  <p>This is my <code>index.jsp</code></p>
  
  <pre><code>&lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;
  
  &lt;!DOCTYPE html&gt;
  &lt;html xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"&gt;
  &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
      &lt;title&gt;Ip&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;jsp:directive.include file="form.html"/&gt;
      &lt;% if (request.getParameter("ip") == null || 
             request.getParameter("ip") == ""){%&gt;
          Not connected!
      &lt;% } else {%&gt;
      &lt;jsp:useBean id="connect" class="test.Ip" /&gt;
      &lt;jsp:setProperty name="connect" property="host" value="Connect" /&gt;
      &lt;jsp:getProperty name="connect" property="host" /&gt;
      &lt;% }%&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is the included file <code>form.html</code></p>
  
  <pre><code>&lt;form action="index.jsp" method="GET"&gt;
      Connect to IP: &lt;input type="text" name="ip"/&gt;
      &lt;input type="submit" value="Connect"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This is the Java file <code>Ip.java</code></p>
  
  <pre><code>package test;
  
  public class Ip{
  
      private String host;
  
      public String getHost(){
          return("Got value " +host);
      }
      public void setHost(String host){
          this.host = host;
      }
  }
  </code></pre>
  
  <p>It returns the string "Got value Connect" instead of the value I type in the form.</p>