Top 250+ Solved Advanced JAVA MCQ Questions Answer

From 151 to 165 of 223

Q. Which HTTP Request method is non-idempotent?

a. GET

b. POST

c. Both A & B

d. None of the above

  • c. Both A & B

Q. Which object is created by the web container at time of deploying the project?

a. ServletConfig

b. ServletContext

c. Both A & B

d. None of the above

  • b. ServletContext

Q. What is the lifecycle of a servlet?

a. Servlet class is loaded

b. Servlet instance is created

c. init,Service,destroy method is invoked

d. All mentioned above

  • d. All mentioned above

Q. Which are the examples of Application Server?

a. Apache

b. Tomcat

c. JBoss

d. Weblogic

  • c. JBoss

Q. In the following statements identify the disadvantages of CGI?

a. If number of clients increases, it takes more time for sending response

b. For each request, it starts a process and Web server is limited to start processes

c. It uses platform dependent language e.g. C, C++, perl

d. All mentioned above

  • d. All mentioned above

Q. Servlet technology is used to create web application

a. True

b. False

c. none

d. all

  • a. True

Q. Which method is used to specify before any lines that uses the PintWriter?

a. setPageType()

b. setContextType()

c. setContentType()

d. setResponseType()

  • c. setContentType()

Q. What are functions of Servlet container?

a. Lifecycle management

b. Communication Support

c. Multithreading Support

d. All of the above

  • d. All of the above

Q. Which object of HttpSession can be used to view and manipulate information about asession?

a. session identifier

b. creation time

c. last accessed time

d. All mentioned above

  • d. All mentioned above

Q. Which methods are used to bind the objects on HttpSession instance and get the objects?

a. setAttribute

b. getAttribute

c. Both A & B

d. None of the above

  • c. Both A & B

Q. Which method take a string not a URL?

a. sendRedirect

b. forward

c. Both

d. None

  • a. sendRedirect
Subscribe Now

Get All Updates & News