Data preprocessing prior to STRUTS2 action
Before entering the updatedormitory.jsp page, get the message of dormitory and buildings and put it into the value stack. The page can be obtained.
<TD Align="center"><a href=" Beforeupdatedormitory? dormitory_id=${dormitory_id}"> Modify </a>
<action name= "beforeupdatedormitory" class=" Com.wolf.dormitoryManage.action.AdminAction " Method=" Beforeupdatedormitory " > <result>/jsp/updatedormitory.jsp</result> </Action>
public String beforeupdatedormitory () { Dormitorydao dao = new Dormitorydaoimpl (); int Dormitoryid = new Integer (servletactioncontext. Getrequest(). GetParameter ("dormitory_id")); Dormitory = dao. Getbydormitoryid (Dormitoryid);Buildingdao Dao2 = new Buildingdaoimpl (); Buildings = dao2. List (); return SUCCESS; }
From for notes (Wiz)
Data preprocessing prior to STRUTS2 action