码迷,mamicode.com
首页 >  
搜索关键字:httpservletrequest    ( 1478个结果
Spring源码研究:数据绑定
在做Spring MVC时,我们只需用@Controllor来标记Controllor的bean,再用@RequestMapping("标记")来标记需要接受请求的方法,方法中第一个参数为HttpServletRequest类型,最后一个参数为Model类型,中间可以为任何POJO,只要符合标准,有...
分类:编程语言   时间:2015-04-16 14:07:38    阅读次数:142
servlet返回json格式字符串,jsp中获取
@Override ????protected?void?doPost(HttpServletRequest?req,?HttpServletResponse?resp) ????????????throws?ServletException,?IOException?{ ????????String?name?=?req...
分类:Web程序   时间:2015-04-16 12:41:20    阅读次数:152
代码保存
获取客户端真实IP package org.j4.utils; import java.util.regex.Matcher; public class WebUtils { /** * 取得客户端真实ip */ public static String getIpAddr() { HttpServletRequest request = ((...
分类:其他好文   时间:2015-04-15 15:08:30    阅读次数:188
java代码实现打包多个文件下载功能
//传入对应的需要打包的file 集合对象//文件打包下载 public static HttpServletResponse downLoadFiles(List files, HttpServletRequest request, HttpServletResponse response) .....
分类:编程语言   时间:2015-04-15 13:25:51    阅读次数:181
springmvc上传监听
/** ??*?重写?parseRequest方法?监听 ??*/ ?@Override ?protected?MultipartParsingResult?parseRequest(HttpServletRequest?request) ???throws?MultipartException?{ ??System.out.pr...
分类:编程语言   时间:2015-04-14 18:11:10    阅读次数:148
文件上传下载
//文件上传public class UpServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException...
分类:Web程序   时间:2015-04-14 09:54:28    阅读次数:152
解决shiro会话标识未更新问题
要解决会话标识未更新的安全问题,就需要在做登录验证时生成新的session,所以需要先将原来的session失效。  一般的解决方法如下: public void login(HttpServletRequest request, ...){ // 让旧session失效 request.getSession(true).invalidate(); //登录验证 ...
分类:其他好文   时间:2015-04-12 21:07:54    阅读次数:1062
jsp的 内置对象
1.request对象      客户端的请求信息被封装在request对象中,通过它才能了解到客户的需求,然后做出响应。它是HttpServletRequest类的实例。    object getAttribute(String name) 返回指定属性的属性值    Enumeration getAttributeNames() 返回所有可用属性名的枚举    String...
分类:Web程序   时间:2015-04-11 10:25:54    阅读次数:117
spring mvc 3.2源码分析
1,httpServlet public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException { HttpServletRequest request; HttpServletResponse response; try { req...
分类:编程语言   时间:2015-04-10 13:41:50    阅读次数:359
SpringMVC标签用法
packagecom.bbwu.springmvc.handlers;importjava.io.IOException;importjava.io.Writer;importjava.util.Arrays;importjava.util.Date;importjava.util.Map;importjavax.servlet.http.HttpServletRequest;importjavax.servlet.http.HttpServletResponse;importorg.springframew..
分类:编程语言   时间:2015-04-09 06:37:58    阅读次数:250
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!