struts2
DonelleYang技术博客
让人生充满永动的势能
-------你以为我在做梦,其实我已走在梦的路上,努力追寻......
展开
-
struts2开发时通过interceptor拦截器实现输入数据过滤前后空格的功能
首先在拦截器注册文件interceptorContext.xml中声明拦截器: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springfra转载 2016-05-15 15:32:56 · 1673 阅读 · 0 评论 -
ActionContext和ServletActionContext小结 (包含IoC和非ioc方式获取request等)
1. ActionContext 在Struts2开发中,除了将请求参数自动设置到Action的字段中,我们往往也需要在Action里直接获取请求(Request)或会话(Session)的一些信息,甚至需要直接对JavaServlet Http的请求(HttpServletRequest),响应(HttpServletResponse)操作. 我们需要在Action中取得request请求参数转载 2016-06-02 15:42:45 · 348 阅读 · 0 评论