M Mr. Dubey π Coach β 103.44K Points π J2EE Technologies Q. Which of the following package contains servlet classes? (A) javax.servlet (B) javax.servlet.http (C) Both of the above (D) None of the above ποΈ Show Answer π¬ Discuss π Share β‘Menu β Correct Answer: (C) Both of the above
M Mr. Dubey π Coach β 103.44K Points π J2EE Technologies Q. How many ServletContext objects are available for an entire web application? (A) One each per servlet (B) One each per request (C) One each per response (D) Only one ποΈ Show Answer π¬ Discuss π Share β‘Menu β Correct Answer: (D) Only one
M Mr. Dubey π Coach β 103.44K Points π J2EE Technologies Q. The init parameter name and value pairs that are defined in web.xml file are handled by (A) ServletConfig object (B) ServletContext object (C) ServletRequest object (D) ServletResponse object ποΈ Show Answer π¬ Discuss π Share β‘Menu β Correct Answer: (A) ServletConfig object
M Mr. Dubey π Coach β 103.44K Points π J2EE Technologies Q. The life cycle of a servlet is managed by (A) servlet context (B) servlet container (C) the supporting protocol (such as http or https) (D) all of the above ποΈ Show Answer π¬ Discuss π Share β‘Menu β Correct Answer: (B) servlet container
M Mr. Dubey π Coach β 103.44K Points π J2EE Technologies Q. Servlet mapping defines (A) an association between a URL pattern and a servlet (B) an association between a URL pattern and a request page (C) an association between a URL pattern and a response page (D) All of the above ποΈ Show Answer π¬ Discuss π Share β‘Menu β Correct Answer: (A) an association between a URL pattern and a servlet
M Mr. Dubey π Coach β 103.44K Points π J2EE Technologies Q. A servlet maintain session in (A) Servlet container (B) Servlet context (C) Servlet request heap (D) Servlet response heap ποΈ Show Answer π¬ Discuss π Share β‘Menu β Correct Answer: (B) Servlet context
M Mr. Dubey π Coach β 103.44K Points π J2EE Technologies Q. The getSession() method with „trueβ as its parameter [ getSession(true) ] it will return the appropriate session object when (A) the session is completed (B) the session object is passed to another method (C) the session does not exists (D) the session is existing ποΈ Show Answer π¬ Discuss π Share β‘Menu β Correct Answer: (D) the session is existing
M Mr. Dubey π Coach β 103.44K Points π J2EE Technologies Q. Which of the following are the session tracking techniques? (A) URL rewriting, using session object, using response object, using hidden fields (B) URL rewriting, using session object, using cookies, using hidden fields (C) URL rewriting, using servlet object, using response object, using cookies (D) URL rewriting, using request object, using response object, using session object ποΈ Show Answer π¬ Discuss π Share β‘Menu β Correct Answer: (B) URL rewriting, using session object, using cookies, using hidden fields
M Mr. Dubey π Coach β 103.44K Points π J2EE Technologies Q. Which method is used to specify before any lines that uses the PrintWriter? (A) setPageType() (B) setContextType() (C) setContentType() (D) setResponseType() ποΈ Show Answer π¬ Discuss π Share β‘Menu β Correct Answer: (C) setContentType()
M Mr. Dubey π Coach β 103.44K Points π J2EE Technologies Q. Which of the following is true about servlets? (A) Servlets execute within the address space of web server (B) Servlets are platform-independent because they are written in java (C) Servlets can use the full functionality of the Java class libraries (D) Servlets execute within the address space of web server, platform independent and uses the functionality of java class libraries ποΈ Show Answer π¬ Discuss π Share β‘Menu β Correct Answer: (D) Servlets execute within the address space of web server, platform independent and uses the functionality of java class libraries