Discussion
Match the following interfaces of Java. Servlet package :
| List - I | List - II |
|---|---|
| a. Servlet Config | i. Enables Servlets to log events |
| b. Servlet Context | ii. Read data from a client |
| c. Servlet Request | iii. Write data to a client |
| d. Servlet Response | iv. To get initialization parameters |
Codes : a b c d
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.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development