摘要: 本文用于记录使用Spring MVC中的零散手札1.在普通java类中获取HttpServletRequest对象 在web.xml的listener节点加入 org.springframework.web.context.request.RequestContextListener //需要使用的地方如下方法获取 HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest(); 阅读全文
posted @ 2014-04-05 12:20 懒惰的肥兔 阅读(477) 评论(0) 推荐(0) 编辑