摘要: 1、访问ActionContext资源request,session,parameters(1)、action实现ServletRequestAware接口,并且重写setServletRequest()// request对象,不用设置get方法,只须重写set方法 private HttpServletRequest request; @Override public String execute() throws Exception { // TODO Auto-generated method stub........... request.se... 阅读全文
posted @ 2013-11-19 19:41 行云有影 阅读(501) 评论(0) 推荐(0)
摘要: 1、jsp添加action1.1 URL执行action">书籍列表1.2 Form执行action 2 Action代码Action代码:package com.test.action;import java.util.ArrayList;import java.util.List;import com.test.bean.Book;public class BookAction {public String listBook() { return "list"; }}3.struts.xml配置3.13.1.1 method制定方法“lis... 阅读全文
posted @ 2013-11-19 13:45 行云有影 阅读(661) 评论(0) 推荐(0)