Java Servlets Question and Answers

33. What are Internal Servlets?
  Internal Servlets are
  • File servlet
  • Invoker servlet
  • CGI servlet
  • Admin servlet
  • Image map servlet
  • ServerSide Include (SSI) servlet
Your Name Your Email-ID
Your Answer
34. What is Server Side Include?
  Server Side Include (SSI) is just another way to load and invoke local as well as remote Servelts.
Your Name Your Email-ID
Your Answer
35. How do the Servlets communicate with each other?
  • A Servlet communicates with another Servlet using the ServletContext interfaces.
  • The ServletContext interface is implemented by the web server. It enables Servlets to obtain information about their environment.
  • The getServlet() and getServletNames() methods of this interface are dangerous to use, because they can corrupt the server's state machine.
Your Name Your Email-ID
Your Answer
36. What are the advantages of Servlets over CGI?
  Servlets offer several advantages over CGI
  • Better performance – Servlets execute within the address space of a web server.
  • Separate process – They create a separate process to handle each client request.
  • Platform independent – Servlets are platform – independent, because they are written in Java.
  • Security – More secure.
  • Functionality – The full functionality of the Java class libraries is available to a Servlet. It can communicate with applets, databases, or other software using sockets or RMI mechanisms.
Your Name Your Email-ID
Your Answer
1234567891011 Page 9 of 11