1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
// TODO Auto-generated method stub
ficheForm formulaire = (ficheForm) form;
int i=Integer.parseInt(request.getParameter("id_fiche"));
System.out.println(i);
HttpSession session = request.getSession();
projet fiche=new projet();
projetDAO ficheDAO=new projetDAO();
org.hibernate.Transaction tx= projetDAO.getSession().beginTransaction();
projet=projetDAO.findById(i);
formulaire.setNum_fiche(String.valueOf(fiche.getNumFiche()));
formulaire.setNum_enquete(fiche.getNumEnquete());
form=formulaire;
session.setAttribute(mapping.getAttribute(),form);
return mapping.findForward("succes");
} |