随笔分类 -  struts2

摘要:利用到的技术:dom4j和xpath 自己写一个Filter 在doFilter中拦截请求 // 2.1 得到请求资源路径 String uri = request.getRequestURI(); String contextPath = request.getContextPath(); Str 阅读全文
posted @ 2016-06-19 16:32 hoey94 阅读(138) 评论(0) 推荐(0) 编辑
摘要:在action类中执行完execute方法后返回成功字符串跳转到result之后再result中设置contentType、contentDisposition、inputStream 在action类中提供对应的getContentType、getDownloadFileName、getInput 阅读全文
posted @ 2016-04-17 17:37 hoey94 阅读(225) 评论(0) 推荐(0) 编辑
摘要:1.通过ActionContext类(拿到的不是真正的servlet api,而是一个map) ActionContext context = ActionContext.getContext(); context.getSession(); context.getApplication(); 2. 阅读全文
posted @ 2016-04-16 21:44 hoey94 阅读(249) 评论(0) 推荐(0) 编辑
摘要:struts2的StrutsPrepareAndExecuteFilter拦截器中对Dispatcher进行了初始化 在Dispatcher类的init方法中定义了配置文件的加载顺序(下面是源码) public void init() { if (configurationManager == nu 阅读全文
posted @ 2016-04-16 21:25 hoey94 阅读(2147) 评论(0) 推荐(0) 编辑
摘要:struts2是apache旗下的一个开源项目,struts2是struts1的下一代产品,是在struts1和WebWork的技术基础上合并出来的全新的一个web框架。其全新的struts2的体系结构与struts1的体系结构差距巨大,struts2的核心是webWork。struts2是一个标准 阅读全文
posted @ 2016-04-16 21:12 hoey94 阅读(325) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示