Java JSB Servlets Question and Answers

5. What is the difference between ServletContext and PageContext?
 
  • ServletContext: Gives the information about the container.
  • PageContext: Gives the information about the Request.
 
Your Name Your Email-ID
Your Answer
6. Can we implement an Interface in a JSP?
  No
 
Your Name Your Email-ID
Your Answer
7. What must be implemented by all Servlets?
  The Servlet Inteface must be implemented by all servlets.
 
Your Name Your Email-ID
Your Answer
8. What are the objects that are received when a Servlet accepts a call from Client?
 
  • The objects are ServletRequest and ServletResponse.
  • The ServletRequest encapsulates the communication from the client to the server.
  • While ServletResponse encapsulates the communication from the servlet back to the client.
 
Your Name Your Email-ID
Your Answer
123456789101112131415


Page 2 of 15