title: Can I use Javabeans with hibernate?
body: <p>I'm using a <strong>hibernate2</strong> plugin in my web project with jsp. My project also contains a register page.</p>
  
  <p>Can I use <strong>Javabeans</strong> to send information from a html <code>&lt;form&gt;</code> using hibernate's class? Without hibernate I created a class with get and set like this:</p>
  
  <pre><code>package com.java2s;
  
  public class Lang {
      private String choix;
      private String comm;
  
      public String getChoix() {
          return choix;
      }
  
      public void setChoix(String choix) {
          this.choix = choix;
          //System.out.println(choix);
      }
  
      public String getComm() {
          return comm;
      }
  
      public void setComm(String comm) {
          this.comm = comm;
          // System.out.println(comm);
      }
  
  }
  </code></pre>
  
  <p>but I know that hibernate generates a get and set class and receives it with:</p>
  
  <pre><code>&lt;jsp:useBean id='user' class='com.java2s.Lang'  type='com.java2s.Lang' scope='session' /&gt;
  &lt;jsp:setProperty name='user' property='*'/&gt;
  </code></pre>
  
  <p>any idea how to do that?</p>