mybook.java

来自「STRUTS2的入门 教程」· Java 代码 · 共 35 行

JAVA
35
字号
package action;

import java.util.List;

import org.apache.struts2.ServletActionContext;

import com.vo.LendBook;
import com.dao.LendDAO;
import com.opensymphony.xwork2.ActionSupport;
/**
 * 
 * USER书籍action
 *
 */
public class Mybook extends ActionSupport {
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		int userid = Integer.parseInt(ServletActionContext.getRequest().getSession().getAttribute("userid").toString());
		list = new LendDAO().noReturn(userid);
		return SUCCESS;
	}

	private List<LendBook> list;

	public List<LendBook> getList() {
		return list;
	}

	public void setList(List<LendBook> list) {
		this.list = list;
	}
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?