About the struts2 some problem
来源:互联网 发布:淘宝添加背景图片代码 编辑:程序博客网 时间:2024/05/21 12:40
1. Get access IP in the action :
ServletActionContext.getRequest().getRemoteHost();
2.Get session in the action and set value:
ServletActionContext.getRequest().getSession().setAttribute("userName","Jone");
3.Get session value in the action:
ServletActionContext.getRequest().getSession("userName");
4.struts2 interceptor:
please look this url content:http://zhidao.baidu.com/link?url=c0bN_-MNzHzadGWC6u9nnGKAYqRkUPL49ozepWZUMjKJ1ET0MHrIGLGPyxSsb9-8xuH7vVKHhK8q1W55zPa8va
5.if you add your interceptor in the struts.xml file ,
you must do this :
add the <interceptor-ref name="defaultStack"/>
into configuration,otherwise struts2 will can't find struts2 framework default interceptor
ServletActionContext.getRequest().getRemoteHost();
2.Get session in the action and set value:
ServletActionContext.getRequest().getSession().setAttribute("userName","Jone");
3.Get session value in the action:
ServletActionContext.getRequest().getSession("userName");
4.struts2 interceptor:
please look this url content:http://zhidao.baidu.com/link?url=c0bN_-MNzHzadGWC6u9nnGKAYqRkUPL49ozepWZUMjKJ1ET0MHrIGLGPyxSsb9-8xuH7vVKHhK8q1W55zPa8va
5.if you add your interceptor in the struts.xml file ,
you must do this :
add the <interceptor-ref name="defaultStack"/>
into configuration,otherwise struts2 will can't find struts2 framework default interceptor
0 0
- About the struts2 some problem
- some record about the board
- Some understanding about the MVC
- Some notes about the time
- Some Problem about VM Workstation in Ubuntu
- some functions about judge the String type
- The problem about fsck bug
- About the IMX6 PCIe Problem
- Some basic knowledges about the class Object (1)
- some thing about the kernel32.dll base address in X64
- Some thought about "The Parallel ADT and Algorithms"(part one)
- introduce HDL and give some examples about the Verilog language
- Some things about the ASCII,Unicode and UTF-8
- The annoying problem about my BIG TOE
- some problem
- the method of resolving the difficult problem about sap
- Some words about ICE...
- About some techno-words
- 密码强度等级
- org.apache.log4j.Logger详解
- html5+css3 权威指南阅读笔记(三)---表单及其他新增和改良元素
- Unity GameObject 中文翻译
- iOS-如何集成iOS9里的3D Touch
- About the struts2 some problem
- Ubuntu搭建FTP服务器
- 关于QT3.3下QListViewItem的应用
- 如何查看Redhat Linux版本号
- Objective-C 学习笔记 4 数据类型和表达式
- js中堆内存和栈内存事例
- hdu5399(模拟)
- hdu 2089 不要62 (数位DP)
- 图文解释XCode常用快捷键的使用