aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Another tough question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Another tough question" Watch "Another tough question" New topic
Author

Another tough question

green hand
Greenhorn

Joined: Apr 27, 2004
Posts: 5
Which two are true about the HTTP POST method? (Choose two)
A. POST requests are faster.
B. It supports multipart MIME requests.
C. Request data is sent in a separate content block.
D. Parameters are accessible using the getQueryString method of the
HttpServletRequest interface.
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
Originally posted by green hand:
Which two are true about the HTTP POST method? (Choose two)
A. POST requests are faster.
B. It supports multipart MIME requests.
C. Request data is sent in a separate content block.
D. Parameters are accessible using the getQueryString method of the
HttpServletRequest interface.

I think B, C.
I dont know whether a POST request is faster than a GET request. In the aspect of the limitation, since GET can only send 255 words data, while POST can send, in theory, unlimited data, POST should be slower in this sense.
D is incorrect because only GET requests use query string.
Nick


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
green hand
Greenhorn

Joined: Apr 27, 2004
Posts: 5
I am not clear about C, can you elaborate more, thanks.
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
Since POST request data can be sent in multipart, for example, the form data, and the upload file information, and thus, they are sent in 2 different content blocks to the server.
Nick
Sudhir Meduri
Greenhorn

Joined: May 28, 2003
Posts: 22
I forgot the exact terminology
but what happens is the POST data(stream data) sits in a sperate block
in the response header.
I think thats what the 'content' in the question meant
Thanks
Sudhir


Thanks,<br />Sudhir <br />SCJP1.4
Jeff Walker
Ranch Hand

Joined: Apr 25, 2004
Posts: 116
Originally posted by green hand:
Which two are true about the HTTP POST method? (Choose two)
A. POST requests are faster.
B. It supports multipart MIME requests.
C. Request data is sent in a separate content block.
D. Parameters are accessible using the getQueryString method of the
HttpServletRequest interface.

Well, I'll work backwards; A. is wrong since its not actually compared to any other request type. E.g. POST is slower on average than a GET (which is what the other posters are trying to say) but I think a HEAD request will beat them all.
D. is wrong because you can't get the parameters out of the query string (I don't think they are there, they are in a separate block, for POST requests).
So by default, B. and C. must be correct answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Another tough question