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);  
上一篇:编写JQuery插件-3


下一篇:Java设计模式-迭代子模式(Iterator)