Data preprocessing prior to STRUTS2 action

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.