Machine-translated by Google. Questions are authored in English.
Top

Discussion

Match the following interfaces of Java. Servlet package :

List - IList - II
a. Servlet Configi. Enables Servlets to log events
b. Servlet Contextii. Read data from a client
c. Servlet Requestiii. Write data to a client
d. Servlet Responseiv. To get initialization parameters

Codes : a b c d

  • A.iii iv ii i
  • B.iii ii iv i
  • C.ii iii iv i
  • D.iv i ii iii

Answer: D

The match is a-iv, b-i, c-ii, d-iii.

ServletConfig gets initialisation parameters, ServletContext lets servlets log events, ServletRequest reads data from a client and ServletResponse writes data to a client.

Code (D) gives these. The other codes give the config or context interface the request or response role. The Servlet API splits the work: ServletConfig is passed to init() and gives the servlet its initialisation parameters, ServletContext gives access to the web application and its log, ServletRequest is the way a servlet reads client data and ServletResponse is how it writes the reply.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.