J2EE Design Patterns and Web Technologies

Questions covering J2EE design patterns including Front Controller, Business Delegate, Service Locator, DAO, Transfer Object, Session Facade, and XML parsing technologies used in web applications.

18 Questions Published

Questions

Question 1 True/False

SAX can be used to modify XML

  1. True
  2. False
Question 2 True/False

DOM loads the whole xml to be parsed in the memory

  1. True
  2. False
Question 3 True/False

Stax is a push based XML Parser

  1. True
  2. False
Question 4 True/False

With Transfer Object, it is possible that one runs into an issue of having multiple copies of the same Transfer object class with different data

  1. True
  2. False
Question 5 True/False

In case your application is completely based on Container Managed Persistence, would you still like to go for DAO design pattern?

  1. True
  2. False
Question 6 True/False

DAO pattern can be implemented to perform all the CRUD operations

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

Out of the following, which interface, would one have to implement to implement an intercepting filter?

  1. Javax.servlet.Filter
  2. Javax.servlet.FilterChain
  3. Javax.servlet.FilterConfig
  4. None of the above
Question 8 Multiple Choice (Single Answer)

Which of the following tags are used for implementing Composite view pattern?

  1. <jsp:include ….>
  2. <%include …%>
  3. All of the above
  4. None of the above
Question 9 True/False

Using include tag improves performance of rendering a page as compared to using include directive?

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

Front Controller design pattern is implemented through implementing which of the following interfaces?

  1. javax.servlet.ServletConfig
  2. javax.servlet.Servlet
  3. javax.servlet.ServletContext
  4. All of the above
Question 11 True/False

Business Delegate simplifies the underlying business service interfaces, so that, at later point of time, it is much easier simpler to modify and maintain business service

  1. True
  2. False
Question 12 True/False

Service Locator pattern can possibly cache the home interface of an EJB to enhance performance of an application.

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

Which of the following patterns provide coarse grained access to business tier?

  1. Business Delegate
  2. Session Façade
  3. Transfer Object
  4. None of the above
Question 14 True/False

Transfer Object Pattern can be used for updating data as well on business tier of an application?

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

DAO Design Pattern solves the problem of encapsulating details of connecting to which of the following data sources?

  1. RDBMS
  2. LDAP
  3. XML/Flat files
  4. All of them
Question 16 True/False

Business Delegate pattern utilizes Service Locator pattern to encapsulate lookup and access of remote services like EJB, web services and others

  1. True
  2. False
Question 17 True/False

A Transfer Object class necessarily would have to implement java.io.serializable in order for it to be passed over the network.

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

Struts, the popular MVC framework by the Jakarta project of Apache utilizes Front Controller pattern in one of the following key components of the framework. Please choose.

  1. Action
  2. ActionForm
  3. ActionServlet
  4. None of the above