Struts2 Action标签和Tomcat启动速度慢(二)
这几天在混日记,很痛苦,前几天就把上个问题解决了,现在写出来。
jsp的内置对象还记得吗?一共有九个。现在要用的是:request。
在Action中这样写:
@SuppressWarnings("unchecked")public String FindProductsType() throws Exception{String modelId="3";String nametype;if(this.nametype==null){nametype=ActionContext.getContext().getSession().get("name").toString();}else{nametype=ActionContext.getContext().getSession().put("name", this.nametype).toString();}Map request=(Map)ActionContext.getContext().get("request");request.put("list", service2.findName(modelId));pageBean=service.queryForPageToUser(3, page, nametype);request.put("pageBeanList", pageBean);return "findproductstype";}<s:property value="#request.pageBeanList"/>