freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

企業(yè)日常事務(wù)管理系統(tǒng)-資料下載頁

2025-04-15 22:29本頁面
  

【正文】 。此RegisterForm為ActionForm的子類,用于在action中向下專型為RegisterForm并獲取其中的參數(shù)。package 。public class RegisterForm extends ActionForm{ protected String username = null。 protected String password1 = null。 protected String password2 = null。 protected String = null。 /** * 以下省略屬性相對應(yīng)的set和get方法 */}3.,以便于在action中使用該formbean formbeans formbean name=registerForm type= /formbean /formbeans4.a(chǎn)ction path=/register parameter=method name=registerForm scope=request type= input=/ forward name=success path=/ / forward name=failure path=/ //action5.RegisterAction類實現(xiàn)注冊的過程public class RegisterAction extends DispatchAction {protected UserDAO userDAO。//由spring容器注入public UserDAO getUserDAO() { return userDAO。 } public void setUserDAO(UserDAO userDAO) {//必須有此set方法用于注入userdao = userDAO。 } public ActionForward register(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { RegisterForm registerForm = (RegisterForm) form。 try { // 判斷在數(shù)據(jù)庫中是否已經(jīng)存在該用戶名 boolean isExist = isExist(request, registerForm)。 if (isExist) { (, new ActionMessage( ))。 } else { //若不存在將注冊信息插入到數(shù)據(jù)庫的User表 insert(request, registerForm)。 } } catch (Exception e) { (, new ActionMessage( ))。 } return (forward)。 } //判斷是用戶名否以存在的函數(shù) private boolean isExist(HttpServletRequest request, RegisterForm registerForm) { if (getUserDAO().isExist(())) {//調(diào)用DAO層的方法判斷數(shù)據(jù)庫中是否以經(jīng)有該用戶名 return true。 } else { return false。 } } //將注冊用戶信息插入數(shù)據(jù)庫的函數(shù) private void insert(HttpServletRequest request, RegisterForm registerForm) { User user = new User()。//創(chuàng)建用戶實體對象 (())。 (())。 (())。 getUserDAO().insertUser(user)。 //調(diào)用DAO層的方法插入到數(shù)據(jù)庫的User表 }}圖53 登錄頁頁面1.2. 創(chuàng)建用戶登錄時用于接收登錄信息的forms 此forms為ActionForm的子類,用于在action中向下專型為LoginForm并獲取其中的參數(shù)。public class LoginForm extends ActionForm { protected String username = null。 protected String password = null。/** * 以下省略屬性相對應(yīng)的set和get方法 */}3. ,以便于在action中使用該formbeanformbeans formbean name=loginForm type= /formbean /formbeans4. action path=/login name=loginForm scope=request type= input=/ forward name=success path=/ / forward name=failure path=/ / /action5. RegisterAction類實現(xiàn)注冊的過程public class LoginAction extends DispatchAction { protected UserDAO userDAO。//由Spring容器注入 public UserDAO getUserDAO() { return userDAO。 } public void setUserDAO(UserDAO userDAO) { = userDAO。 } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { LoginForm loginForm = (LoginForm) form。 try { // 接收用戶名 String username = ()。 // 如果已經(jīng)有session設(shè)為無效 HttpSession session = (false)。 if (session != null) { ()。 } //創(chuàng)建新的session session = (true)。 // login boolean isValid = valid(request, loginForm)。 if (isValid) { (, username)。 (User + username + login.)。 } else { (, new ActionMessage( ))。 } } catch (Exception e) { (, new ActionMessage( ))。 } // If a message is required, save the specified key(s) // into the request for use by the struts:errors tag. if (!()) { saveErrors(request, messages)。 (loginFormBean, loginForm)。 forward = ()。 } else { forward = ()。 } return (forward)。 } //判斷用戶是否合法 private boolean valid(HttpServletRequest request, LoginForm loginForm) { if (getUserDAO().isValid((),//調(diào)用DAO層的方法 ())) { return true。 } else { return false。 } }}圖54 聯(lián)系人模塊界面1. ?method=add?method=edit?method=delete2. 創(chuàng)建用與接收,編輯/添加過聯(lián)系人信息的forms此forms為ActionForm的子類,用于在action中向下專型為AddressForm并獲取其中的參數(shù)。public class AddressForm extends ActionForm { protected String id = null。 protected String username = null。 protected String name = null。 protected String sex = null。 protected String mobile = null。 protected String = null。 protected String qq = null。 protected String pany = null。 protected String address = null。 protected String postcode = null。/** * 以下省略屬性相對應(yīng)的set和get方法 */}3. ,以便于在action中使用該formbeanformbeans formbean name=addressForm type= /formbean /formbeans4. 將關(guān)于聯(lián)系人的請求Action轉(zhuǎn)入到下面配置的action中進(jìn)行處理 action path=/address parameter=method name=pageForm scope=request type= forward name=list path=/ / /action action path=/address_add parameter=method name=addressForm scope=request type= input=/ forward name=list path=/ / forward name=add path=/ / /action action path=/address_edit parameter=method name=addressForm scope=request type= input=/ forward name=list path=/ / forward name=edit path=/ / /action圖55 日程安排模塊界面1. 新增日程安排對應(yīng)的Action為:?method=add 修改對應(yīng)的Actin為:?method=edit刪除對應(yīng)的Action為:?method=delet2. 創(chuàng)建用于接收新增/編輯過的日程按安排信息forms此forms為ActionForm的子類,用于在action中向下專型為ScheduleForm并獲取其中的參數(shù)。public class ScheduleForm extends ActionForm { protected String id = null。 protected String username = null。 protected String year = null。 protected String month = null。 protected String day = null。 protected String plan = null。/** * 以下省略屬性相對應(yīng)的set和get方法 */}3. ,以便于在action中使用該formbeanformbeans formbean name=scheduleForm type= /formbean /formbeans4. 將關(guān)于日程安排請求的Action轉(zhuǎn)入到下面的Action中進(jìn)行處理action path=/schedule parameter=method name=pageForm scope=request type= forward name=list path=/ / /actionaction path=/schedule_add parameter=method name=schedule
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1