title: Search method in Struts with MySQL
body: <p>Hey guys I'm having some problems with a project that I'm doing :/</p>
  
  <p>I have this code </p>
  
  <pre><code>public class ListaAlumnoAction {
  
  private List&lt;Alumno&gt; alumnos;
  
  public String execute(){
      String camino="success";
      EntityManager em= Utilitario.getInstance().getEntityManager();
      Query query=em.createQuery("Select o From Alumno o");
      alumnos=query.getResultList();
      return camino;
  }
  
  public List&lt;Alumno&gt; getAlumnos() {
      return alumnos;
  }
  
  public void setAlumnos(List&lt;Alumno&gt; alumnos) {
      this.alumnos = alumnos;
  }
  }
  </code></pre>
  
  <p>This method gives me a list of students. But in this case I just want 1 student, searching by code for example or by name and last name. The thing is I don't know what kind of tools use for this purpose. </p>
  
  <p>Thanks in advanced.</p>