Which of the following HTTP protocol methods is eligible to produce unintended side effects upon multiple identical invocations beyond those caused by single invocation?
a. GET
b. POST
c. HEAD
d. PUT
e. OPTIONS
The answer to this is (b).
SCWCD 1.4<br />---------------------<br />Ability is what you're capable of. <br />Motivation determines what you do. <br />Attitude determines how well you do it.<br />---------------------
9.1.2 Idempotent Methods
Methods can also have the property of "idempotence" in that (aside from error or expiration issues) the side-effects of N > 0 identical requests is the same as for a single request. The methods GET, HEAD, PUT and DELETE share this property. Also, the methods OPTIONS and TRACE SHOULD NOT have side effects, and so are inherently idempotent.
However, it is possible that a sequence of several requests is non- idempotent, even if all of the methods executed in that sequence are idempotent. (A sequence is idempotent if a single execution of the entire sequence always yields a result that is not changed by a reexecution of all, or part, of that sequence.) For example, a sequence is non-idempotent if its result depends on a value that is later modified in the same sequence.
A sequence that never has side effects is idempotent, by definition (provided that no concurrent operations are being executed on the same set of resources).
SCWCD 1.4<br />---------------------<br />Ability is what you're capable of. <br />Motivation determines what you do. <br />Attitude determines how well you do it.<br />---------------------
SCWCD 1.4<br />---------------------<br />Ability is what you're capable of. <br />Motivation determines what you do. <br />Attitude determines how well you do it.<br />---------------------
Originally posted by chowdary Thammineedi:
Of course you can. If your form says that the method to be used is PUT, then the HttpServlet's service() method will definitely call your doPut() method. Now, in your doPut() method you'd better use a getInputStream() of the ServletRequest interface to get the raw binary data and then store them as requested under the requested name.
May be you can use FTP protocol to upload files, Why not try FTP to generate Dynamic pages? Dont both FTP and HTTP use TCP as the underlying mechanism?
Debashish
--------------
SCJP2, SCWCD 1.4, PMP, ITIL Foundation, Cloud Foundry Certified Developer, AWS SA Associate
PUT is used to send data that is to be associated with a given URL. For example, if you PUT a file named a.html (on local machine) to a url http://www.myserver.com/b.html, then the contents of a.html will be stored on the server and will be made accessible through the URL of http://www.myserver.com/b.html. This feature is used mainly by site builder tools.
SCWCD 1.4<br />---------------------<br />Ability is what you're capable of. <br />Motivation determines what you do. <br />Attitude determines how well you do it.<br />---------------------
Debashish
--------------
SCJP2, SCWCD 1.4, PMP, ITIL Foundation, Cloud Foundry Certified Developer, AWS SA Associate
SCWCD 1.4<br />---------------------<br />Ability is what you're capable of. <br />Motivation determines what you do. <br />Attitude determines how well you do it.<br />---------------------
Consider Paul's rocket mass heater. |