Struts2三种数据转移方式
package com.cdai.web.ssh.action;import com.cdai.web.ssh.request.LoginRequest;import com.cdai.web.ssh.service.UserService;import com.opensymphony.xwork2.Action;import com.opensymphony.xwork2.ModelDriven;public class LoginAction implements Action, ModelDriven<LoginRequest> {private LoginRequest request = new LoginRequest();private UserService userService;@Overridepublic String execute() {System.out.println("Login action - " + request);return SUCCESS;}@Overridepublic LoginRequest getModel() {return request;}}