I want to modify my jsp page after submission with some additional readonly fields. I have used iterators and if conditions. I am working in struts2. How to reset my save page after saving?
public String savePerson(){
Session hSession = ActionManager.getHibernateSession();
profileObj.setProfileId(pid);
Date doBirth = DateFunctions.toDate(dob);
profileObj.setDob(doBirth);
try{
pid = ProfileDAO.getInstance().addProfils(hSession, profileObj);
addressObj.setProfileId(pid);
AddressDAO.getInstance().addAddress(hSession, addressObj);
setMessage("Succesfully saved.");
if (pid > 0){
hSession.clear();
resetProfile(pid);
//i want to include my jsp page with hidden fields additionally.
}
} catch (HibernateException hExc) {
setMessage("Unable to save.");
return ERROR;
} finally {
ActionManager.closeHibernateSession();
}
return SUCCESS;
}