in order to separate java code and html code and be more faithful to MVC framework i am coding like that; in the servlet i put the following:
net.sf.hibernate.Session s = null; ...