J2EE Interview Questions and Answers
J2EE Interview Questions and Answers
J2EE is an open-source platform to deploy, manage, and develop the web-enabled Apps, and multi-tier Apps. Here, we are providing the best J2EE Interview Questions and Answers, which are useful for both freshers and experienced in J2EE platform. By learning these interview questions, one can easily acquire the knowledge in Servlets, Java Server Pages (JSP), Web-application servers, Server-side components, Hibernate, Object-relational Mapping, Struts framework etc. It is a good opportunity for you to go through these J2EE Interview Questions that help to crack your job interview and acquire a good career in the J2EE platform.
In case you’re searching for J2EE Interview Questions and answers for Experienced or Freshers, you are at the correct place. There is parcel of chances from many presumed organizations on the planet. The J2EE advertise is relied upon to develop to more than $5 billion by 2020, from just $180 million, as per J2EE industry gauges. In this way, despite everything you have the chance to push forward in your vocation in J2EE Development. GangBoard offers Advanced J2EE Interview Questions and answers that assist you in splitting your J2EE interview and procure dream vocation as J2EE Developer.
Best J2EE Interview Questions and Answers
Do you believe that you have the right stuff to be a section in the advancement of future J2EE, the GangBoard is here to control you to sustain your vocation. Various fortune 1000 organizations around the world are utilizing the innovation of J2EE to meet the necessities of their customers. J2EE is being utilized as a part of numerous businesses. To have a great development in J2EE work, our page furnishes you with nitty-gritty data as J2EE prospective employee meeting questions and answers. J2EE Interview Questions and answers are prepared by 10+ years of experienced industry experts. J2EE Interview Questions and answers are very useful to the Fresher or Experienced person who is looking for a new challenging job from the reputed company. Our J2EE Questions and answers are very simple and have more examples for your better understanding. By these J2EE Interview Questions and answers, many students are got placed in many reputed companies with high package salaries. So utilize our J2EE Interview Questions and answers to grow in your career.
Q1) What is J2EE?
Java 2 Enterprise Edition (J2EE) platform used to develop web-based applications. It consists of Application Programming Interface (API), a set of services, and protocols for managing, developing, and deploying the applications of multi-tier server-centric. It provides a stable and secured Java platform to the enterprise.
Q2) What are the components of J2EE applications?
There are four types of components in J2EE applications.
Application Clients Components (Client-tier components)
JSP technology and servlet (Web-tier components)
Resource Adapter Components
Q3) Name the types of J2EE Clients?
- J2EE Clients are of four types:
- Application Clients
- Wireless clients (based on MIDP technology)
- Java Web Start clients
Q4) What is Servlet, and what are the phases in the Servlet lifecycle?
Servlet: Servlet is a side component that creates a server-side program by providing a powerful mechanism. Servlets can be available for different protocols. It is an independent server platform. Hypertext Transfer Protocol (HTTP) is the most commonly used protocol of Servlet.
Phases in Servlet Lifecycle:
There are five phases in Server Lifecycle:
- Classloading phase
- Instantiation phase
- Initialize phase
- Request Handling phase
- Removal phase
Q5) What is meant by a web component?
Java Server Pages and Java Servlet technology components are referred to as web components. JSP (Java Server Pages) allows a more natural approach in the creation of static content. Servlet is a Java programming language that receives the request and answers it.
Q6) What is meant by Java Server Faces (JSF)?
Java Server Faces (JSF) acts as a User Interface (UI) for Java web applications in designing a framework. JSF is based on Model View Controller (MVC) pattern. It saves form data on the server-side and populates it on the client-side.
Q7) Who needs the J2EE platform?
J2EE is needed for Independent Software Vendors because it gives a blueprint to provide the solution of expertise computing on the Java platform. The expertise developers also need J2EE to get high productivity in writing distributed applications of business.
Q8) What is meant by J2EE Container?
J2EE Container is the interface between a low-level platform and a component. In other words, the J2EE Container is termed as a framework that provides relevant services to the Application server.
Q9) Describe Model-View-Controller on struts?
Model: It represents the system’s internal state as a set of many Java Beans.
View: It can be constructed by using the technology Java Server Pages (JSP).
Controller: It is the process of producing the next level of user interface as per the request and focuses request receiving by the client.
Q10) Define Hashtable?
Hashtable is defined as the collection of synchronized objects. It is like a HashMap and value keys. It doesn’t allow duplicate values.
Q11) What is Hibernate, and what are the limitations of Hibernate?
Hibernate: A query service and an object-relational mapping which allows writing Hibernate Query Language (HQL) is known as Hibernate. It doesn’t allow us to write Structured Query Language (SQL) scripts. Hibernate is faster than SQL, which has compelling object-oriented contents like inheritance, associations, and polymorphism. Hibernate consists of substantial collections and persuasive compositions. It allows query makings by using the Java-based approach.
Limitations of Hibernate:
- In HQL query execution, it takes more time than the usual period.
- There are no shared reference values.
- It prevents the options of advanced query and supports only composite keys.
Q12) What is ORM, and what are the advantages of ORM?
Object-Relational Mapping (ORM): It is defined as the Java class mapped objects to the relational database metadata tables which describe object mapping and database. The working method of ORM is to transform one representation form data into another form.
Advantages of ORM:
- Productivity: It reduces the data access coding time with automatic code creation on the data defined model.
- Maintainability: The codes generated from Object-Relational Mapping are tested well. The developer needs to correct only functionality.
- Performance: The Object-Relational Mapping code manages the application data access. There is no need for creating data access code and optimize the speed up of the process.
- V endor Independence: The code generated from Object-Relational Mapping does not depend on the vendor. It increases the application portability.
Q13) What is the use of method save() and method saveorupdate()?
- Usage of method save(): The method is used to store the object in the database. Before inserting it, there is a check for duplicate records in hibernate.
- Usage of method saveorupdate(): The method is used to update the object by using an identifier. If the identifier value is zero, then this method directs to call save().
14) What is the difference between load() and get() methods?
Load(): This method never returns null and can’t find the object from dthe atabase or cache.
Get(): If the object can’t found then get() method returns null. Get() method never returns a proxy, whereas load() returns proxy.
Q15) Define Connection Pooling?
Connection Pooling: A mechanism which helps in re-using the existing connections is known as Connection Pooling. This pooling mechanism maintains object-oriented connections which were already created. Without creating a new connection, this Pooling mechanism directly uses the existing connection.
Q16) Name the core interfaces of Hibernate and collection types in Hibernate?
Core Interfaces of Hibernate:
- SessionFactory Interface
- Transaction Interface
- Session Interface
- Configuration Interface
- Criteria and Query Interface
Collection types in Hibernate:
Q17) What is the difference between being J2EE compatible and being Ja 2EE license?
A J2EE license has signed as the J2EE commercial distribution license. It means the license commits compatibility and compatible tests. It doesn’t convey the meaning that the products are compatible. The J2EE brand has significantly passed the Compatibility Test Suite (CTS).
Q18) What is the main difference between J2EE and Java EE 5 SDK?
Java EE 5SDK is used to Java EE 5 and its complete implementation to help the developers in learning improved specifications. Java EE 5 includes Java SE platform, Server Platform Edition 9 and various other tools to help the prototype of Java EE application developers.
Q19) Define Thin Client and Hibernate Proxy?
Thin Client: A program interface to the application that doesn’t have the operations like a complicated business, database queries, or third-party application connection is known as the Thin Client.
Hibernate Proxy: An object proxy that avoids retrieving of an object until the user needs it. Hibernate doesn’t make the proxy of objects by default.
Q20) What is the differences between .jar, .war, and .ear files?
- .jar files: These files are work with .jar extension. The .jar files contain accessories, resources, and libraries like property files.
- .ear files: These files contain application EJB modules.
Q21) What are the types of JSP tags?
The JSP tags are divided into four types:
Q22) What are JSP Directives?
The following are the JSP Directives:
- Include Directives (include= header.jsp)
- Page Directives (page language= java)
- Taglib Directives (prefix=html & taglib uri= tlds/taglib.tld)
Q23) What is Struts framework?
An MVC architecture which is used to design large-scale applications is called a Struts framework. It is the combination of Java Server Pages, Java Servlets, message, and Custom tags. Struts are used to create a development environment to the application based on the proven design patterns and published standards. Model in applications represents the system’s internal state as a set of many Java Beans. A view can be constructed by using the technology Java Server Pages (JSP). The controller produces the next level of user interface as per the request and focuses request receiving by the client. Class Action Servlet is the primary component in the controller framework. These action servlet configured by using the ActionMapping sets.
Q24) Define ActionMapping and ActionForm?
ActionMapping: In ActionMapping, the user specifies action class a particular URL like target views and paths at which the request-response starts forwarding. The ActionMapping also represents the mapping of a request for a specific class of action that an ActionServlet knows. The mapping can pass to the Action class execute() method by enabling information access directly.
ActionForm: A Java Bean that associates with ActionMapping are known as ActionForm. A Java Bean becomes FormBean when it extends .apache .org. Action. Structs. ActionForm class. On the server-side, the object of ActionForm is populated at which UI client enters the data. ActionForm maintains web application session state.
Q25) What are the core modules in spring?
There are seven core modules in the spring:
- Object/Relational Mapping module
- Core Container module
- Application Context module
- Web module
- Aspect-Oriented Programming
- DAO module
- Mobile View Controller (MVC) module
Q26) What are the functions of RequestProcessor and ActionServlet?
The following are the functions of RequestProcessor and ActionServlet:
- Handling Content type Issues
- Populating Java Bean
- Receiving request from HttpServlet
- Providing extension points
- Displaying web page issue response
Q27) What does the web module contain?
Web Module contains:
- Servlets Class files
- Java Server Page files
- HTML and GIF files
- Web Deployment Descriptor
Q28) What are the advantages of Hibernate?
The following are some of the significant advantages of Hibernate:
Hibernate can map the Domain objects to the relational database.
It is independent of vendor and database; that’s why it is called a portable framework.
When compared to JDNS, Hibernate has better connectivity of database.
Q29) Define EJB, and what are the system services provided by EJB container?
EJB (Enterprise Java Beans): EJB is a component in the server-side that encapsulates the business logic and executes in an EJB container for the enterprise application.
System services provided by EJB container:
- Connection pooling
- Component lifecycle management
Q30) What are the EJB application’s design principles?
- The applications of EJB are loosely coupled.
- The interfaces specify EJB application behaviour.
- In the client-side, the implementation can be hidden.
- The Application API lies in the session tier.
- It supports application developer.
- The data source API lies in entity tier.
Q31) What are the types of JSP directive?
There are three types of JSP directives available:
- Include directive
- Page directive
- Taglib directive
Q32) What is meant by the Expression element, and what are the comments types that are supported by JSP?
Expression element: It is the element which is used to write dynamic content into the client browser.
Comments types that are supported by JSP:
- JSP comment
- HTML comment
Q33) Write the advantages of EJB components?
- EJB components doesn’t maintain resources.
- It has the components of integration support from the vendors.
- The client interactions are specifying the java interfaces.
- The assembled applications are separated from source components.
- Portability support.
- Detailed knowledge about EJB components.
Q34) Define JNDI, JTA, and JMS?
JNDI: Java Naming Directory Interface (JNDI) is used to access directory service data.
JTA: Java Transaction API (JTA)is used to manage and coordinate the transactions of the information enterprise system.
JMS: Java Messaging Service (JMS) is used to send and receive messages by using messaging systems.
Q35) Explain J2EE tiers?
Client Tier: The client tier indicates the browser from which the server request processed. The interfaces of client tier are Java application, HTML browser, non-Java application or an applet.
Middle Tier: Middle tier comprises of integration tier and presentation tier. In this, the User Interface (UI) is created at the presentation tier by using Javaserver pages. The business logic can be written with enterprise Java bean inside the business tier. The database objects can be created in the integration tier.
Backend: The backend contains the Enterprise Information System (EIS), and it is used in data stores.
Q36) Define Security Socket Layer (SSL)?
Security Socket Layer (SSL): The technology which is used to communicate between the web browser and the web server is known as Security Socket Layer (SSL). Usually, SSL is also referred to as a protocol which describes how to use encryption algorithms. This technology establishes encrypted link in among parties and allows sensitive information transmission like debit/credit card, login credentials, and social security numbers.
Q37) What are the advantages of spring application?
The spring application is used to development testability of applications.
The Plain Old Java Object (POJO) is based on the facility development in re-using the existing components.
It also improves maintainability by reducing code coupling.
It is possible to reduce cost by improving application productivity.
It doesn’t need an application server.
Q38) Describe the Action Form?
Action form is a java bean which is associated with multiple action planning. The objects of action form are populated at the server end when the data entered from the user interface (UI). Action form also maintains web application session states.
Q39) Name the design goals of J2EE architecture?
Service Availability: The availability of application must have 24/7 support. The app doesn’t require customer service representatives.
Data Connectivity: The application should connect to the legal systems and mainframe systems in making the business functions as usual.
User Interaction: The user should connect application from laptop, desktop, mobile, and PDA.
Accessibility: The user should connect application from any electronic devices.
Flexibility: The developer must concentrate on business logic, and the server will handle remaining services.
Q40) Describe the roles of J2EE Architect?
The following are the roles of a J2EE Architect:
Creating a blue system
Defining functional and non-functional requirements.
Visualizing system behaviour.
Integration of non-functional requirements to the system.
Defining the working process of system elements.
Q41) Name the activities of Architectural Design, Architectural Analysis, and Object-Oriented Design?
Activities of Architectural Design:
- The requirements of hardware and software are defined.
- Analysing technology and reusing the existing components.
- Approach to achieve the performance parameter will be defined.
- Defining security, business logic, and system performance.
- Architectural design decides which framework to be used.
Use case diagram: This is used to depict the high-level functionality of the system.
Collaboration diagram: This is used to depict in talking to each other.
Class diagram: This is used to develop the functionality of methods and classes.
Sequence diagram: This is used depict the sequence operation.
It Creates deployment diagrams.
It can decide classes interaction.
Creates dependency diagrams.
It can decide components reside in the deployment folder.
Q42) Define the J2EE 1.4 SDK?
J2EE 1.4 SDK is a complete package of deploying and developing J2EE 1.4 applications. It also contains J2SE 1.4.2, Sun Java system application, and API documentation of J2EE 1.4 to help to learn prototype J2EE applications. The J2EE 1.4 SDK is used for deployment and development.
Q43) What is the difference between Java EE 5 SDK and J2EE?
The Java EE 5 SDK is used to provide a total implementation of Java EE 5 specification with extra features by helping developers to learn new technologies and improve the specifications. The Java EE 5 SDK also includes the Java SE platform and Java Server Platform edition 9 as its foundation. It helps the developers to learn Java EE platform.
Q44) Mention the responsibilities of Bean deployer?
Below are the responsibilities of Bean deployer:
- It defines groups, users, manage security, and roles.
- Use wrapper classes and deployment tools.
- Map groups and user roles.
- It ensures in assigning transaction paramter.
- Map fields to manage persistence and database.
Q45) What are the roles of the EJB framework’s third-party software?
The following are the roles of the EJB framework’s third party software:
Component Provider: It is responsible for programming, developing object modelling, and business process.
Container Provider: It is responsible for providing runtime to the server environment.
Application Server Provider: It is responsible for providing the platform for distributed develop applications. It also contains the runtime environment container.
Q46) What is EDI?
Electronic Data Interchange is used to exchange data through VAN (Value Added Network) that acts as a transmission medium. EDI requires transferring client customization, and it is costly to install. It also depends on X12 standards.
Q47) What are the capabilities of J2EE Architecture?
The following are the capabilities of J2EE architecture:
- Scalability: It supports the server load
- Flexibility: The change in architecture or hardware doesn’t impact the entire system.
- Reusability: The system component can be reused, and it can save development time.
- Security: The system information cannot be modified or hacked.
- Performance: In a short frame of time, it can perform functionality.
- Availability: The accessibility of the system is of 24*7 support.
Q48) Define Reference Architecture and System Architecture
- Reference Architecture: It represents a stylish method. The reference architecture refers to the coherent design principle.
- System Architecture: It represents the architecture as a product. It comprises proposed system interfaces, component functions, interactions, and constraints. The system architecture is the foundation application design implementation.
Q49) Mention the best practices that are followed in Value Object?
- Value Object should represent the server value.
- It should contain business objects by getting set methods.
- VO should not refer to the server object.
- It should update the object model bean along with the respective value.
Q50) What is meant by Client certification Authentication?
Client certification Authentication: It is a mechanism that uses SSL and HTTP in which the server authenticates with public key certification. A public key infrastructure called X.509 defines it.