Java Servlets, JSP, and MVC Architecture

Quiz covering Java web development technologies including Servlets, JSP pages, MVC design patterns, and the Struts framework. Tests knowledge of Java EE web components and architectural concepts.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of these has highest performance?

  1. Servlets
  2. Jsp
  3. Perl pages
  4. Html
Question 2 Multiple Choice (Single Answer)

How will you pass values from HTML page to the Servlet?

  1. response.setparameter () method
  2. response.getparameter () method
  3. request.setparameter () method
  4. request.getparameter () method
Question 3 True/False

If i put a Servlet on each servers, and there is a static variable in thisServlet. Do all the instances on these servers share the same static variable?

  1. True
  2. False
Question 4 Multiple Choice (Single Answer)

How do I get authentication with myServlet?

  1. HTTPRequest.setUserName()
  2. HttpServletRequest.getUserName()
  3. HTTPResponse.setUserName()
  4. HTTPResponse.getUserName()
Question 5 Multiple Choice (Single Answer)

What does controllers do?

  1. acts as an interface between view and model
  2. does not interact with view
  3. does not interact with controller
  4. nothing but view
Question 6 Multiple Choice (Single Answer)

core class of the Struts Framework

  1. ActionServlet
  2. ActionJsp
  3. ActionClass
  4. Action
Question 7 Multiple Choice (Single Answer)

What are the drawbacks of Struts?

  1. backword overflow
  2. forward overflow
  3. Single controller servlet
  4. no forward overflow
Question 8 True/False

A controller is the link between a user and the system.

  1. True
  2. False
Question 9 Multiple Choice (Single Answer)

Expansion of MVC architecture

  1. Model,Vision,Controller
  2. Medium,Vision,controller
  3. Model,View,Controller
  4. Model,View,Concept
Question 10 Multiple Choice (Single Answer)

Struts framework is based on ---- architeture

  1. MVS
  2. MVC1
  3. MVC
  4. MVC2
Question 11 Multiple Choice (Single Answer)

MVC1 architecture is

  1. loosely coupled
  2. not coupled
  3. tightly coupled
  4. coupled
Question 12 Multiple Choice (Single Answer)

The model component includes

  1. Bean
  2. HTML
  3. servlet
  4. jsp
Question 13 Multiple Choice (Single Answer)

The View part of MVC includes

  1. bean
  2. EJB
  3. JSP
  4. Servlet
Question 14 Multiple Choice (Single Answer)

The controller part includes

  1. Html
  2. jsp
  3. Servlet
  4. Bean
Question 15 True/False

In MVC2 flow is controlled by single servlet

  1. True
  2. False
Question 16 Multiple Choice (Multiple Answers)

Advantages of MVC

  1. Reusable
  2. Expressive
  3. not easy to use
  4. Easier support
Question 17 Multiple Choice (Single Answer)

What are Cookies

  1. information sent by web server
  2. information sent by servlet
  3. information sent by browser
  4. information sent by jsp
Question 18 Multiple Choice (Single Answer)

Method by which sensitive data is sent?

  1. doPost
  2. doGet
  3. Get
  4. Post
Question 19 Multiple Choice (Single Answer)

How do I send email from my Servlet?

  1. Mail Service
  2. Simple Mail Protocol
  3. Java Mail Service
  4. Mail Protocol
Question 20 Multiple Choice (Single Answer)

Which of these has highest performance?

  1. Servlets
  2. Jsp
  3. Perl pages
  4. Html