码迷,mamicode.com
首页 >  
搜索关键字:servletactioncontext    ( 141个结果
ActionContext和ServletActionContext小结
1. ActionContext 在Struts2开发中,除了将请求参数自动设置到Action的字段中,我们往往也需要在Action里直接获取请求(Request)或会话 (Session)的一些信息,甚至需要直接对JavaServlet Http的请求(HttpServletReque...
分类:其他好文   时间:2014-07-29 16:12:59    阅读次数:205
struts下ajax提交与页面进行提示 返回值为null
@Override public String execute() throws Exception { if ("none".equals(task)) { HttpServletResponse response = ServletActionContext.getResponse();...
分类:其他好文   时间:2014-07-26 00:01:56    阅读次数:389
解决struts2文件下载中文名问题
package com.bgsnewlook.action; import com.opensymphony.xwork2.ActionSupport; import org.apache.struts2.ServletActionContext; import java.io.InputStream; import java.net.URLEncoder; public class Dow...
分类:其他好文   时间:2014-07-21 10:18:38    阅读次数:252
webapp各种路径获取
1、ServletActionContext.getServletContext().getRealPath("/")得到:C:\Users\JL\Workspaces\.metadata\.me_tcat\webapps\HuiLife\ServletActionContext.getServle...
分类:移动开发   时间:2014-07-21 09:35:13    阅读次数:267
Seesion的使用
设置时效:1分钟HttpSession session=ServletActionContext.getRequest().getSession(true); session.setAttribute("random", random); session.setMaxIn...
分类:其他好文   时间:2014-07-16 18:40:37    阅读次数:167
spring 获取 bean
ApplicationContext ac1 = WebApplicationContextUtils.getRequiredWebApplicationContext(ServletActionContext.getServletContext()); TopicAction result = ....
分类:编程语言   时间:2014-06-20 18:48:36    阅读次数:220
路径获取
1、项目根目录(tomcat、web项目)String path = ServletActionContext.getServletContext().getRealPath("");System.out.println(path);想要获取图片存放的位置,则为String path = Servl...
分类:其他好文   时间:2014-06-15 16:27:14    阅读次数:205
域对象的引用,ActionContext 和ServletActionContext类的使用
ActionContext 获取 域引用的mapServletActionContext获取具体域对象//域范围 ActionContext ac = ActionContext.getContext(); Map applicationMap = ac.getAppli...
分类:其他好文   时间:2014-06-06 17:23:42    阅读次数:183
strust2之jsp调用action的变量
1、HttpServletRequest request=ServletActionContext.getRequest(); ........request.setAttribute("list", list);2#request.list ...
分类:Web程序   时间:2014-05-19 12:34:32    阅读次数:282
java:session的创建与销毁
创建session: ServletActionContext.getRequest().getSession().setAttribute("update", model); DutiesScienceEndowScore update = (DutiesScienceEndowScore) .....
分类:编程语言   时间:2014-05-17 23:06:39    阅读次数:244
141条   上一页 1 ... 12 13 14 15 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!