To help I'm posting my struts-config with the mapping that fails:
<action path="/saveEvent" name="eventForm" scope="request"
type="actions.EventAction" parameter="save">
<forward name="success" path="/inicial.do"/>
<forward name="error" path="message?showMessage=error">
</action>
The DAO class:
public class EventDAOImpl extends HibernateDaoSupport implements EventDAO
{
public void save(Event event)
{
getHibernateTemplate().saveOrUpdate(event);
}
}
Well the page expires after I call the method to save the Event object at my action class:
public ActionForward save(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) throws ParseException
{
Event event = (Event) req.getSession().getAttribute("event");
if (event == null)
return mapping.findForward("error");
EventDAO eventDao = (EventDAO) getWebApplicationContext().getBean(Constants.EVENT_DAO);
eventDao.save(event);
return mapping.findForward(Constants.MAPPING_SUCCESS);
}
When I'm debuging, when the save is made, I dont know why, the thread doesnt ge to the return line. So when the page expires the exception is thrown.
Please, anybody can help me?