• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where can I find 'POST' Request String?

 
stevens liu
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
request.getParameter("yourparameter")

Bosun
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
request.getParameter("yourparameter")

Bosun
 
stevens liu
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 87
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
stevens liu
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's working now! thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic