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