i tried it with forms in session scope but no changed occured and the previous error araised.
about my code: i don't use any special code i use the following code for getting my objects from DB :
public List getPolicies(){
return getHibernateTemplate().executeFind(
new HibernateCallback()
{
public Object doInHibernate(Session session)
throws HibernateException, SQLException {
Criteria crit = session.createCriteria(Policy.class);
return crit.list();
}
});
}
and after that in my jsp i print objects exist in Policy through its getter method.
i tried another solution for lazy fetching in spring, ie: openSessionInViewInterceptor.
but what wrong goes with this strategy is that session is closed when i want to access any objects in object Policy