Test Status
      (A) Servlets executes slower compared to CGI
      (B) Servlets are thread based and CGI is process based
      (C) Servlet has no platform specific API, where as CGI has
      (D) All of the above
      (A) a
      (B) b
      (C) c
      (D) d
      (A) request.getResource("/WEB-INF/myconfig.xml")
      (B) session.getResource("/WEB-INF/myconfig.xml")
      (C) getClass().getResource("/WEB-INF/myconfig.xml")
      (D) context.getResource("/WEB-INF/myconfig.xml")
      (A) Cookie c = request.getCookie("username");
      (B) Cookie c = null; for ( Iterator i = request.getCookies(); i.hasNext(); ) { Cookie o = (Cookie) i.next(); if ( o.getName().equals("username") ) { c = o; break; } }
      (C) Cookie c = null; for ( Enumeration e = request.getCookies(); e.hasMoreElements(); ) { Cookie o = (Cookie) e.nextElement(); if ( o.getName().equals("username") ) { c = o; break; } }
      (D) Cookie c = null; Cookie[] cookies = request.getCookies(); for ( int i = 0; i < cookies.length; i++ ) { if ( cookies[i].getName().equals("username") ) { c = cookies[i]; break; } }
      (A) HttpServlet class
      (B) GenericServlet class
      (C) both A and B
      (D) only A
      (A) servlet.mappings
      (B) servlet.xml
      (C) web.xml
      (D) Simple.java
      (A) WAR files must be located in the web application library directory.
      (B) WAR files must contain the web application deployment descriptor.
      (C) WAR files must be created by using archive tools designed specifically for that purpose.
      (D) The web container must serve the content of any META-INF directory located in a WAR file.
      (A) response.getOutputWriter()
      (B) response.getWriter()
      (C) response.getWriter().getOutputStream()
      (D) response.getWriter(Writer.OUTPUT_TEXT)
      (A) request.addCookie(new Cookie("username", "joe"));
      (B) response.addCookie(new Cookie("username", "joe"));
      (C) response.addCookie("username", "joe");
      (D) request.addCookie("username", "joe");