Struts2几种传值
1.url向action传值
url为
http://localhost/txyl/teacher_info?method:teacher_info&teacher_seq=dedafdsf322124few
action中取值为
import org.apache.struts2.ServletActionContext; String teacher_seq = ServletActionContext.getRequest().getParameter("teacher_seq");
2.JSP
session.setAttribute("user",user);
3..java
ActionContext.getContext().getSession().put("chapter_id",chapter_id);
积跬步以致千里,积小流以成江海。
2016年5月之前的博文发布于51cto,链接地址:shamrock.blog.51cto.com
2016年5月之后博文发布与cnblogs上。
Github地址 https://github.com/umgsai
Keep moving~!!!
2016年5月之前的博文发布于51cto,链接地址:shamrock.blog.51cto.com
2016年5月之后博文发布与cnblogs上。
Github地址 https://github.com/umgsai
Keep moving~!!!