request 笔记

来源:互联网 发布:ubuntu给普通用户权限 编辑:程序博客网 时间:2024/05/17 00:01

1.setCharaceterEncoding  : overrides the name of the character encoding used in the body(post的内容才会写在body里) of this request.

this mehtod must be called prior to reading request parameters or reading input using getReader().otherwise,it has no effect.

 

 2.getInputStream:retrieves the body (这里的body当使用post方法时才能读到内容)of the request as binary data using a servletinputstream.

 

3. getRequestURL: reconstructs the url the client used to make the request.the returned URL contains a protocol ,server name,port number,and server path,but it does not include query string parameters.

 

原创粉丝点击