title: Servlet, JSP, JavaBeans and HTML form
body: <p>I'm working on a servlet that makes a connection to a database gets the information of one of the tables ans sends this information to a jsp file. This file will print on the brower the information table, adding radio buttons that allows us to choose one of the rows.</p>
  
  <p>The servlet looks like this:</p>
  
  <pre><code>List&lt;InfoBean&gt; items = new ArrayList&lt;InfoBean&gt;();
  if (!conexion.isClosed()){
    Statement st = (Statement) conexion.createStatement();          
    ResultSet rs = st.executeQuery("select * from lista_audio" );
    while (rs.next())
    {items.add(getRow(rs));}
    conexion.close();}
  req.getSession().setAttribute("items", items);
  </code></pre>
  
  <p>In the JSP file I can print a table with the information, adding radio buttons that the user will use to choose 1 row and send the selected info to a servlet using a form I can add:</p>
  
  <pre><code>&lt; form action="administ" method=get enctype=multipart/form-data&gt;    
  &lt; table&gt;
   &lt; table border=\"1\"&gt;&lt; tr&gt;&lt; th&gt;Title&lt; /th&gt;&lt; th&gt;Author&lt; /th&gt;&lt; th&gt;Album&lt; /th&gt;&lt; /tr&gt;
   &lt; c:forEach items="${items}" var="item"&gt;
   &lt; tr&gt;&lt; td&gt;&lt;input type="radio" name="SongInfo" value=${item.title}&gt;
   &lt; td&gt;${item.title}&lt; /td&gt;
   &lt; td&gt;${item.author}&lt; /td&gt;
   &lt; td&gt;${item.album}&lt; /td&gt;&lt; /tr&gt;
   &lt; /c:forEach&gt;
  &lt; /table&gt;
  </code></pre>
  
  <p>In the field 'value' I should be able to send to the servlet the information stored in ${item.title}. When I set value = ${item.title} and title is, for example "The bodyguard", in the servlet the information I can retrieve is just "The". It looks like it sends the characters located before the first white space of the string. How could I get the whole string?</p>
  
  <p>Thanks</p>