Ankit Garg wrote:Its hard to say what the problem is without the action code.
Here is the action code.
Ankit Garg wrote:Also you are setting HTTP Cookies in a DAO class?? This is a very bad design.
Why is it a bad design? Please suggest something better.
Ankit Garg wrote:so each time the tallyVote method is called, hibernate is configured and session factory is built. Hibernate configuration should happen only once and then you can store the SessionFactory object in your DAO class
I'm not entirely sure what you mean here. Please explain
Ankit Garg wrote:(actually there should be a separate class to manage hibernate configuration and SessionFactory which is used by all DAO classes). Again a bad design...
Again, please elaborate why this is a bad design and what would be better.