title: jsf set errors when i connected to workbench
body: <p>I'm new to java ee and I'm trying to make my first website using java ee but I find a lot of difficult when i want to connect my jsf to workbench I have also a problem with serialization because i have always to generate the serial of beans manually</p>
  
  <p>this it my beans
  Userbean.java</p>
  
  <pre><code>@ManagedBean
  @Named /*("userBean")*/ 
  @RequestScoped
  public class Userbean implements Serializable{
  
  private static final long serialVersionUID = 1043069413653729199L;
  
  private String iduser="";
  private String username="name";
  private String password="0000";
  private String email="";
  private String city="";
  private String country="";
  
  public Userbean() {
      super();
      // TODO Auto-generated constructor stub
  }
  
  public Userbean(String iduser, String username, String password, String email, String city, String country) {
      super();
      this.iduser = iduser;
      this.username = username;
      this.password = password;
      this.email = email;
      this.city = city;
      this.country = country;
  }
  
  public String getIduser() {
      return iduser;
  }
  
  public void setIduser(String iduser) {
      this.iduser = iduser;
  }
  
  public String getUsername() {
      return username;
  }
  
  public void setUsername(String username) {
      this.username = username;
  }
  
  public String getPassword() {
      return password;
  }
  
  public void setPassword(String password) {
      this.password = password;
  }
  
  public String getEmail() {
      return email;
  }
  
  public void setEmail(String email) {
      this.email = email;
  }
  
  public String getCity() {
      return city;
  }
  
  public void setCity(String city) {
      this.city = city;
  }
  
  public String getCountry() {
      return country;
  }
  
  public void setCountry(String country) {
      this.country = country;
  }
  public String returnAction2() {
      PreparedStatement ps;
      String query ="INSERT INTO `jee`.`user`( `username`, `email`, `password`, `city`, `country`) VALUES (?,?,?,?,?)";
      boolean a=false;
      try {
          ps= Myconnection.getConnection().prepareStatement(query);
  
          ps.setString(1,username);
          ps.setString(2,email);
          ps.setString(3,password);
          ps.setString(4,city);
          ps.setString(5,country);
  
  
          if(ps.executeUpdate()&gt;0){
          a=true;
          }
      } catch (SQLException ex) {
          ex.getStackTrace();
          a=false;
      }
  
      return a==true ? "success" : "failure";
  }
  </code></pre>
  
  <p>}</p>
  
  <p>this is my view <strong>sign up</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns:f="http://xmlns.jcp.org/jsf/core" 
    xmlns:h="http://xmlns.jcp.org/jsf/html"&gt;
  &lt;f:view&gt;
      &lt;head&gt;
          &lt;title&gt;Login screen&lt;/title&gt;
          &lt;link rel="stylesheet" type="text/css" href="styles.css" /&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h1&gt;sign up&lt;/h1&gt;
  
          &lt;h:form&gt;
  
              username: 
              &lt;h:inputText id="username" value="#{userBean.username}" /&gt;
              &lt;br/&gt;
  
              Password:
              &lt;h:inputSecret id="password1" value="#{userBean.password}" /&gt;
              &lt;br/&gt;
               email:
              &lt;h:inputSecret id="email" value="#{userBean.email}" /&gt;
              &lt;br/&gt;
               city:
              &lt;h:inputSecret id="city" value="#{userBean.city}" /&gt;
              &lt;br/&gt;
               country:
              &lt;h:inputSecret id="country" value="#{userBean.country}" /&gt;
              &lt;br/&gt;
  
  
  
              &lt;h:commandButton action="#{userBean.returnAction2}" value="Connect" /&gt;
  
         &lt;/h:form&gt;
      &lt;/body&gt;
  &lt;/f:view&gt;
  &lt;/html&gt;
  </code></pre>