If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hibernate insert statement from JSP page

Thanks for your supports. I'm improving in using the frameworks - Hibernate and Spring. My question is very simple: I have a dropdown on a jsp page that is populated from the database thus and a textbox that accepts input to be inserted into database based on the values selected in the dropdown: JSP code:

My quest is this: how do I write the query statement in the Dao class to do this insertion? I am very new to this so I'm inexperienced in calling jsp parameters within the j2ee classes. My sample DAO implementation class:

Hello ken2010
The idea behind Hibernate is that you do not need to necessarily write your own SQL like statements.
What you would usually do is to create an instance of the object that you want to persist (make sure the class is annotated correctly!) and then use a session (instantiated by the SessionFactory) and call the save method. Hibernate will do the insert for you!