Exam 1z0-900 All QuestionsBrowse all questions from this exam
Question 46

Given the following code:

What should you do at line 1 to enable this servlet receive request data without blocking?

    Correct Answer: B

    In order to enable the servlet to receive request data without blocking, you should define a ReadListener and assign it to the request input stream. This is because ReadListener allows you to handle incoming data as it becomes available without blocking, which is the primary mechanism for implementing non-blocking I/O in servlets.

Discussion
devmsalehOption: B

Answer is B

kozionovOption: B

Answer is B https://docs.oracle.com/javaee/7/tutorial/servlets013.htm#BEIHICDH

orjavaOption: B

Answer B. Nonblocking I/O 1- Put the request in asynchronous mode 2- Obtain an in/output stream from request/response objects. 3- Assign a read/write listener to the stream. 4- Process the request/response inside the listener's callback methods