request.getQueryString()就是获取查询字符串
比如客户端发送
http://localhost/test.do?a=b&c=d&e=f
通过request.getQueryString()得到的是
a=b&c=d&e=f
查API如下
Request.getQueryString()
Syntax
Request.getQueryString()
Returns
The query string corresponding to the current client request.
Description
The query string consists of the parameters following the URL. For example,
if the client's browser was directed at http://servername/webname/pagename.csp?paramName=paramValue,
the query string would be paramName=paramValue.
Example
response.write("QueryString: " +
Request.getQueryString());
// this code called from a webcall
function named main()
// would print: "QueryString: _fn=main"
Related
Topics
Request Object, Request.getParameter(), Request.getRequestURI()
本质就是获取带参数查询
====================================
===========================
HttpServletRequest getQueryString();
今天出了很大的纰漏,我们站上工行充值渠道疯狂掉单,原因是开发包陈旧,但是没法查到日志,写的日志全是空文件,原因就是我将request.getQueryString()写到文件中当日志,怪我对这个方法理解不透,回来好好反省一下,查了api,写了这个方法:
api第一句:Returns
the query string that is contained in the request URL after the
path,这就说明它只对get方法抛的数据有效。post方法传的参数getQueryString将什么都得不到。
比如客户端发送
http://localhost/test.do?a=b&c=d&e=f
通过request.getQueryString()得到的是
a=b&c=d&e=f
查API如下
Request.getQueryString()
Syntax
Request.getQueryString()
Returns
The query string corresponding to the current client request.
Description
The query string consists of the parameters following the URL. For example,
if the client's browser was directed at http://servername/webname/pagename.csp?paramName=paramValue,
the query string would be paramName=paramValue.
Example
response.write("QueryString: " +
Request.getQueryString());
// this code called from a webcall
function named main()
// would print: "QueryString: _fn=main"
Related
Topics
Request Object, Request.getParameter(), Request.getRequestURI()
本质就是获取带参数查询
====================================
===========================
HttpServletRequest getQueryString();
今天出了很大的纰漏,我们站上工行充值渠道疯狂掉单,原因是开发包陈旧,但是没法查到日志,写的日志全是空文件,原因就是我将request.getQueryString()写到文件中当日志,怪我对这个方法理解不透,回来好好反省一下,查了api,写了这个方法:
api第一句:Returns
the query string that is contained in the request URL after the
path,这就说明它只对get方法抛的数据有效。post方法传的参数getQueryString将什么都得不到。
