1.获得请求参数

req.getParameter("name");(得到的是字符串)

req.getParameters("name");(得到的是字符串数组)

Servlet中Request的方法

Servlet中Request的方法

Servlet中Request的方法

2.获得项目部署名

req.getContextPath();

Servlet中Request的方法

3.获得所有请求头信息

req.getHeaderNames();

Servlet中Request的方法

Servlet中Request的方法

4.cookie

req.getCookies();

Servlet中Request的方法

5.获得请求类型(get或post)

Servlet中Request的方法

6.获得文件上传内容

Servlet中Request的方法

7.url?后面跟的内容

Servlet中Request的方法

8.服务器的ip地址

Servlet中Request的方法

9.servlet部署名

Servlet中Request的方法

10.解决中文乱码问题

Servlet中Request的方法

Servlet中Request的方法

11.session对象

Servlet中Request的方法

12.servletcontext对象

Servlet中Request的方法

 

 

 

 

 

相关文章: