can i use javabeans with hibernate ?

Posted by Dilllllo on Stack Overflow See other posts from Stack Overflow or by Dilllllo
Published on 2011-06-22T23:57:36Z Indexed on 2011/06/23 0:22 UTC
Read the original article Hit count: 373

Filed under:
|
|

Hello i'm using a plugin of hibernate2 in my webproject with jsp ,in my project i have a register page. Can i use javabeans to send information from a html <form> using hibernate class's ?

with out hibernate i creat class with get and set like that

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);
          }

}

but i know that hibernate generate a get and set class !

and recive it with that :

 <jsp:useBean id='user' class='com.java2s.Lang'  type='com.java2s.Lang' scope='session' />
<jsp:setProperty name='user' property='*'/>

any idea how to do that ?

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about jsp