aspose file tools
The moose likes Servlets and the fly likes Where can I find 'POST' Request String? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Where can I find Watch "Where can I find New topic
Author

Where can I find 'POST' Request String?

stevens liu
Greenhorn

Joined: Sep 11, 2001
Posts: 4
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
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
request.getParameter("yourparameter")

Bosun
stevens liu
Greenhorn

Joined: Sep 11, 2001
Posts: 4
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
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
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
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:


Java Resources at www.wbrogden.com
stevens liu
Greenhorn

Joined: Sep 11, 2001
Posts: 4
It's working now! thanks.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Where can I find 'POST' Request String?
 
Similar Threads
Error with ibatis
what is beta exam?
Passed IBM 158
How much I/O do I have to know?
what should be output