- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
session获取(会议获取)
session获取(会议获取)
Used directly in the Java code in request, obtained by the name of the ${sessionScope. in JSP}...
The session value obtained from the submission of the form data
The code in the action class:
ActionContext (ac=ActionContext.getContext);
Map (map=ac.getSession);
Map.put (username, username);
Map.put (password, password);
ActionContext ac=ActionContext.getContext (session); access
(ac.getSession) (.Put, session); access from action
When the user registration, the user registration values stored in the set method, this time has been stored in the value stack
The value stack holds all values in the action.
Map (map=ac.getSession); the user name, password in session;
(map.put); is placed in the session value
Map.put (session) storage
Session returns the map object;
Parameter attribute value
The value of ValueStack vs= (ValueStack) request.getAttribute stack (struts.valueStack)
(* * Note: request.getAttribute (struts.valueStack); the struts.valueStack case. Strictly divided)
Session is a map type
The JSP page for session
ValueStack vs= (ValueStack) request.getAttribute (struts.valueStack);
If (vs! =null) {
String username=vs.findString (username);
String password=vs.findString (password);
Out.println (username);
}
%
Another way: using the sign, obtain session variable value. Above: ${username}
ActionContext
On request (Request) parameter (Param), using get (automatic call interceptor framework) and set () method is set to the field of the corresponding Action, direct access request in the Action (Request) or session (Session) some of the information, or even directly on the JavaServlet request (HttpServletRequest), Http response (HttpServletResponse) operation.
ActionContext is a Action implementation of the context, the context can be seen as a container (in fact, the container here is an Map only), Action objects are stored in execution when needed. Put in context (webwork) parameter request (Parameter), (Session, Servlet) session context (ServletConte
您可能关注的文档
- java 控制台中读取数据(Read the data in the Java console).doc
- java corba(java CORBA).doc
- java 语言书(java 语言书).doc
- it人成长路上最容易犯的17个错误(It 17 people most likely to commit errors on the growth road).doc
- ip-gurad使用说明(Ip-gurad use).doc
- java+读写文件文本文件的示例+(Read and write java+ file text file + Example).doc
- java object中hashcode和equals方法的作用(Hashcode and equals Java the role of object).doc
- java中如何处理事务(How to handle the affairs of Java).doc
- java人生j2ee学习流程(Java life J2EE learning process).doc
- j2ee学习流程简介(J2EE learning process.).doc
- sessionfactory.getcurrentsession()说明(sessionfactory.getcurrentsession () 说明).doc
- sga系统全局区内存结构了解(The SGA memory structure system global area understanding).doc
- servlet(Servlet).doc
- sharepoint 2007部署过程详细图解_03_部署moss 2007(SharePoint 2007部署过程详细图解_03_部署苔藓 2007).doc
- sharepoint 2007部署过程详细图解(SharePoint 2007 deployment process detailed illustrations).doc
- shell语法(Shell grammar).doc
- shrimataji谈如何入静(霎哈嘉瑜伽中阶冥想法)(Shrimataji talk about meditation (Sahaja Yoga Meditation in order)).doc
- shx 全面项目管理高级实务(深圳,12月8-9日)(Senior comprehensive project management practice of SHX (Shenzhen, December 8-9)).doc
- simcity4(Simcity4).doc
- sk管理体系supex(Sk management system supex).doc
文档评论(0)