Test Status
      SERVLETRANDOMTEST
      (A) response.getOutputWriter()
      (B) response.getWriter()
      (C) response.getWriter().getOutputStream()
      (D) response.getWriter(Writer.OUTPUT_TEXT)
      (A) a
      (B) b
      (C) c
      (D) d
      (A) response.setLength(numberOfBytes);
      (B) response.setContentLength(numberOfBytes);
      (C) response.setHeader("Length", numberOfBytes);
      (D) response.setIntHeader("Length", numberOfBytes);
      (A) request.addCookie(new Cookie("username", "joe"));
      (B) response.addCookie(new Cookie("username", "joe"));
      (C) response.addCookie("username", "joe");
      (D) request.addCookie("username", "joe");
      (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) 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) servlet.mappings
      (B) servlet.xml
      (C) web.xml
      (D) Simple.java
      (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