struts2基础总结.docVIP

  • 1
  • 0
  • 约7.28千字
  • 约 9页
  • 2016-08-23 发布于重庆
  • 举报
struts2基础总结

Struts2基础 三种方式接收用户输入 使用领域对象接收用户输入 package com.lyw.ch03.action; import com.lyw.ch03.model.User; import com.opensymphony.xwork2.Action; /** * * @author luoyanwen * 时间:2012-08-04 * 使用领域对象接收用户信息 * */ public class LoginAction implements Action{ private User user; public User getUser() { return user; } public void setUser(User user) { this.user = user; } public String execute() throws Exception { if(scott.equals(user.getUserName()) tiger.equals(user.getPassWord())){ return SUCCESS; }else{ return ERROR; } } } 页面示例login.jsp form action=loginAction method

文档评论(0)

1亿VIP精品文档

相关文档