Tag: web technology

Questions Related to web technology

  1. Object Oriented

  2. Write Once, Run Anywhere

  3. Compiled Programming language

  4. None of the above


Correct Option: B
  1. Group Project Lead

  2. Group Project Location

  3. General Public License

  4. None of the above


Correct Option: C

For a given ServletResponse response, which retrieves an object for writing binary data?

  1. response.getWriter()

  2. response.getOutputStream()

  3. response.getOutputWriter()

  4. response.getWriter(Writer.OUTPUT_BINARY)


Correct Option: B

AI Explanation

To answer this question, you need to understand the difference between writing character data and binary data in a ServletResponse.

Option A) response.getWriter() - This option is incorrect because the getWriter() method retrieves a PrintWriter object that is used for writing character data. It is not used for writing binary data.

Option B) response.getOutputStream() - This option is correct because the getOutputStream() method retrieves a ServletOutputStream object that is used for writing binary data. This is the correct method to use when writing binary data to the ServletResponse.

Option C) response.getOutputWriter() - This option is incorrect because there is no getOutputWriter() method in the ServletResponse interface. This method does not exist.

Option D) response.getWriter(Writer.OUTPUT_BINARY) - This option is incorrect because there is no overloaded getWriter() method that accepts a parameter of type Writer.OUTPUT_BINARY. This method does not exist.

The correct answer is B) response.getOutputStream(). This option is correct because the getOutputStream() method retrieves a ServletOutputStream object that is used for writing binary data to the ServletResponse.

  1. request.getCookies()

  2. request.getAttributes()

  3. request.getSession (). GetAttributes()

  4. request.getSession ().getCookies()


Correct Option: A
  1. The servlet's init method returns a non-zero status

  2. The servlet's init method throws a Servlet Exception

  3. The servlet's init method sets the Servlet Response's content type to null.

  4. The servlet's init method does NOT return within a time period defined by the servlet container


Correct Option: B,D
  1. a base-64 encoded user name and password

  2. a form that POSTs to the j_security_check URL

  3. an applet that requests the user name and password from the user

  4. a hidden field that supplies the login-constraint used by the application


Correct Option: B
  1. Andrew fonts

  2. Andale WT fonts

  3. Albany fonts

  4. Ad fonts


Correct Option: B