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:
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?
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:
Application context 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:
Differentiate between war, jar and ear files?
Ear files are the . ear extension files used in EJB modules of applications.
Jar files are .jar extensions and contains accessories, resources and libraries. These are used for property files.
What are the uses of ORM?