Thanks a lot for the reply.
In cfg.xml. I had accidently put
<property name="hbm2ddl.auto">create</property>
I changed the create to update.
Thanks.I have got another doubt.Could you sort it out
I wanted to edit the values previously stored in the database.
I am using struts with hibernate for it.
I have used a dispatchaction class where I have written add,delete and edit code.
each operation is calling another method where the database calls are done.
the vaues read from the database are stored in the arraylist, and they are passsed to the actionclass .then these are passed to
jsp page to display the values.Is there any other effective
way to do the application rather than passing collection through pages. I was told that it affects performance, if session object that stores collections are passed over .