Advanced Java - Servlets and EJB

Java Enterprise Edition topics covering Servlet lifecycle, HTTP response handling, and Enterprise JavaBeans architecture

5 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following methods is invoked by the container for loading a servlet, before servicing any request?

  1. service()
  2. destroy()
  3. init()
  4. getinitParameter(String name)
  5. getinitParameterName()
Question 2 Multiple Choice (Single Answer)

Which of the following HTTP response header methods is used to set a response header with the given name and date value?

  1. addDateHeader(java.lang.String name, long date)
  2. setDateHeader(java.lang.String name, long date)
  3. getDateHeader(java.lang.String name)
  4. getHeader(java.lang.String name)
  5. containsHeader(java.lang.String name)
Question 3 Multiple Choice (Single Answer)

Which of the following is no longer used by the EJB architecture to identify the enterprise beans contained in an ejb-jar file?

  1. ejb-jar manifest
  2. ejb-jar file
  3. ejb-client JAR file
  4. Home interface
  5. TX_BEAN_MANAGED
Question 4 Multiple Choice (Single Answer)

By which of the following methods does a bean represent to the outside world to do its work?

  1. Home interface
  2. Remote interface
  3. RemoteException
  4. Get
  5. Post
Question 5 Multiple Choice (Single Answer)

Which of the following performs work for its client, shielding the client from complexity by executing business tasks inside the server?

  1. Session bean
  2. Entity bean
  3. Applet
  4. Servlet
  5. Java IDL