J2EE Interview Questions
What is J2EE and the types of components used in J2EE Application?
It is Java 2 Enterprise Edition. This is based on Application programming interfaces(APIs), set of services and protocols.
Types of components:
Business components. JSP Technology and servlets are web components. Application clients components. Resource Adapter components.
Spring is used for development of enterprise application in open source framework, that solves the complexity of enterprise application development, which is primarily based on inversion control or dependency injection design pattern.
What are the uses of spring?
Dependency injection can be used to improve testability. It decreases coupling in code and increases maintainability. Increase the productivity and subsequently decreases the development cost. Spring required enterprise services without the need of expensive application server.
What are the different phases that included in life cycle of servlet?
Servlet installation. Request handling The init method Removal from the service. Servlet class loading.
What must be executed by servlets?
A servlet interface must be executed by all servlets.
Is Servlet a pure java object or not?
Yes, it is pure java object.
What is the method to create object without using the keyword “new” in java?
Yes we can create objects without using new, here is example:
c is Calender and method is getInstance()
What is the scope of default in spring?
Differentiate the types of modules in spring?
7 types of are there in spring, they are:
DAO module. Web module Application context module MVC module The core container module Aspect oriented programming O/R mapping module.
Define Ear File?
The modules in J2EE Application is delivered by EAR File. it is nothing but an extension file, like .ear extension.
List out the collection types in HIbernate?
Bag, Map, Array, set and List.
List out JSP Tag?
There are 4 JSP tags, they are: Expressions. Scriplets. Declarations Directives.
Differentiate between war, jar and ear files?
What are the uses of ORM?
Vendor independence Performance Maintainability Productivity.