Advanced Java - Servlets and EJB
Java Enterprise Edition topics covering Servlet lifecycle, HTTP response handling, and Enterprise JavaBeans architecture
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?
- service()
- destroy()
- init()
- getinitParameter(String name)
- 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?
- addDateHeader(java.lang.String name, long date)
- setDateHeader(java.lang.String name, long date)
- getDateHeader(java.lang.String name)
- getHeader(java.lang.String name)
- 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?
- ejb-jar manifest
- ejb-jar file
- ejb-client JAR file
- Home interface
- 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?
- Home interface
- Remote interface
- RemoteException
- Get
- 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?
- Session bean
- Entity bean
- Applet
- Servlet
- Java IDL