I can find the request string of 'GET' by 'getQueryString()' method of httpRequest class, but where can find it of 'POST'?
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
posted
0
request.getParameter("yourparameter")
Bosun
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
posted
0
request.getParameter("yourparameter")
Bosun
stevens liu
Greenhorn
Joined: Sep 11, 2001
Posts: 4
posted
0
thanks for reply! I want to get the whole request string of 'POST', not a parameter of it,can you give me another advice? thank you in advance.
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
posted
0
I am not even sure if that can be done for POST. You may just have to use GET as the "action" of your form. getQueryString() is available only for a GET request.
Bosun
shilpa kulkarni
Ranch Hand
Joined: Jun 07, 2000
Posts: 87
posted
0
I agree with Bosun, when you POST there is no 'QueryString'. Query String is that part of the http request which follows the servlet/jsp path and the '?'. In case of POST there is not such string.
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
1
posted
0
You can get the entire POSTed raw data as a binary InputStream by calling the getInputStream method in the ServletRequest interface, or as a BufferedReader by calling getReader. I think you may have to do this without calling any of the getParameter methods, but try it and see. Bill ------------------ author of: