码迷,mamicode.com
首页 >  
搜索关键字:httpservletrequest    ( 1478个结果)
Spring mvc中使用request和response
@ResponseBody @RequestMapping(value="/ip", method=RequestMethod.GET) public String getIP(HttpServletRequest request, HttpServletResponse res...
分类:编程语言   时间:2015-03-06 18:51:08    阅读次数:162
jsp request 对象详解
1.request对象 客户端的请求信息被封装在request对象中,通过它才能了解到客户的需求,然后做出响应。它是HttpServletRequest类的实例。序号 方 法 说 明 1 object getAttribute(String name) 返回指定属性的属性值 2 Enumeratio...
分类:Web程序   时间:2015-03-06 16:59:45    阅读次数:130
客户端通过http协议以多参数方式连接服务端
服务端: /**  * 接收并处理http请求  */ public ModelAndView list(HttpServletRequest request, HttpServletResponse response) throws Exception { System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
分类:Web程序   时间:2015-03-05 22:23:26    阅读次数:182
SpringMvc下载excel文件
@RequestMapping public void download(HttpServletRequest request, HttpServletResponse response) throws Exception { response....
分类:编程语言   时间:2015-03-05 14:15:53    阅读次数:142
import javax.servlet.ServletException出错
import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http...
分类:编程语言   时间:2015-03-04 21:08:45    阅读次数:153
如何在SpringMVC中获取request对象
1.注解法@Autowiredprivate HttpServletRequest request;2.在web.xml中配置一个监听HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRe....
分类:编程语言   时间:2015-03-04 15:54:57    阅读次数:104
java获取ip地址
有很多应用需要取得来访者的IP地址,比如防止未授权用户或恶意用户的访问等。J2EE的SERVLET标准接口javax.servlet.http.HttpServletRequest提供了getRemoteAddr()方法,用来取得来访者的IP地址。 request.getRem...
分类:编程语言   时间:2015-03-03 16:50:17    阅读次数:169
Struts2.5框架搭建
struts2.5用到的基础开发包 Action类 package com.htf.action; import javax.servlet.http.HttpServletRequest; import org.apache.struts2.ServletActionContext; public class HelloWorld { /** * Struts2.5用到的基...
分类:其他好文   时间:2015-03-03 16:47:19    阅读次数:109
HttpServletRequest、request常用方法、request常见应用、请求转发、RequestDispatcher
HttpServletRequest对象代表客户端的请求,当客户端通过HTTP协议访问服务器时,HTTP请求头中的所有信息都封装在这个对象中,开发人员通过这个对象的方法,可以获得客户这些信息。request常用方法获得客户机信息getRequestURL方法返回客户端发出请求时的完整URL。getR...
分类:Web程序   时间:2015-03-02 14:36:19    阅读次数:178
使用jcifs.smb.SmbFile读取Windows上共享目录的文件
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ...
分类:Windows程序   时间:2015-02-28 14:18:36    阅读次数:291
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!