the problem is you are relying on your own ServletFilter this is possibly a configuration problem please display hibernate.xml,hibernate.properties
Fairly comprehensive example of configuring hibernate with struts is located at http://www.hibernate.org/105.html Martin ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Sat, 31 Jan 2009 04:30:44 -0800 > From: rouxe...@yahoo.com > Subject: interceptor redirection problem > To: user@struts.apache.org > > Hi, > > here's my code. > I want to show an error message if it's impossible to commit. But it seems my > action still display the 'success' result. > > can anybody help me? > > > > public String intercept(ActionInvocation invocation) throws Exception { > String retour = Action.ERROR; > try { > sf.getCurrentSession().beginTransaction(); > retour = invocation.invoke(); > sf.getCurrentSession().getTransaction().commit(); > } catch(Exception e) { > try{ > Transaction tx = sf.getCurrentSession().getTransaction(); > if(tx != null && tx.isActive()) { > tx.rollback(); > } > }catch (Exception e1) { > e1.printStackTrace(); > } > retour = Action.ERROR; > } > return retour; > } > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _________________________________________________________________ Windows Live™ Hotmail®:…more than just e-mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_012009