J2EE Interview Questions and Answers - Freshers & Experienced

What are the J2EE components used while creating an application?

- The J2EE components consist of the functional unit that is used in the application and all the classes of it are also will get used to communicate with various components.
- The J2EE is having several components like :

1. Application clients and applets : These components run on the client side to provide the user interface and easy access to applications.
2. Java Servlet and JavaServer Pages technology : These are used on the server side to deal with the web related technology. They provide the web related functionalities and user interfaces so that the client can interact with them.
3. Enterprise JavaBeans : These are the components that are used for businesses and they are also implemented and run on the server. These are very useful in providing the core and advanced functionality to the user.

What is the purpose of web client in J2EE?

The web client is very important part and it has other two parts that defines the way it functions :

- Dynamic part : That gives the dynamic web pages using various markup languages like XML, HTML, etc. This is the part that is generated by using the web components that run in the web tier. The web browser is required to render the pages.
- Static part : That provides static pages from the server to the client that doesn’t change according to the demands. It remains static all the time and provide the information that is like support information or about us.
- The web client is known as thin client that is a very simple web based client doesn’t do any query, execution of business rules and connecting applications. It provides lightweight operations and provides the security, speed and different services to run the applications on the server.

How is applet different from other technologies used in J2EE?

Applets are client application that is small in size and it is included in the web tier. It provides the tools to communicate with the users and allow the drawings to be made by using the graphical interface. The applets are written in Java language. This gets executed on the virtual machine used by the Java and installed on the web browser. The plug in required by the client system for the use of security policy that executes the application in the web browser successfully. The components use API keys for creating the web client programs and run the application on the client side. As, no security is allowed the files are not required on the client system. It presents more modular approach to design the application using applets.

What is the purpose of the Application Clients in J2EE?

Application client runs on the client side and provide a way to the user to handle the task that is allowing the user to use the interface. The interface that is provided is graphical and tools are given for the help. The graphical user interface is created using swing and advanced window toolkit from the command line interface. These clients can use the applications directly due to the applications being handled at the business tier. The application client communicates throughout the HTTP connection using the servlet and the Java beans component architecture. The application client also includes various components to manage the overall data flow for the communication purpose between the server and the client.

What is the communication process of the application using the Java Beans?

JavaBeans components allow an object to be used to use the instance variables. The instance variables consist of get and set methods that are used on the server side to get the data information from the user and set it in the server. It provides lot of variations and elements can be used for the client tier. The client communicates through the business logic that is being provided by the server to run the applications. The web browser is used to communicate through the server by going through the pages that is being made and the transfer happens from the web tier. The J2EE application uses thin client or thick client that provides the lightweight and heavyweight functionality to the client and keep the load also to minimal on the server as well.

Explain the use of containers in J2EE.

Containers acts as an interface between a platform and a component that is at the low level and it provides the functionality that is supported by the component. Application clients get executed first and then the beans. It keeps the beans assembled at one place so that it can be used and deployed using the containers. The application consists of the components that are platform specific so the containers allow them to be bundled at one place and then used in the application just by giving the name and the path. The assembling of the beans requires the configuration settings to be seen for each component that is used inside the J2EE application or just by J2EE.

What are the Container settings that are being provided by the J2EE server?

- J2EE server supports the customization of the server by providing the services like security, transaction management, Java naming directory and other services that can be used to provide the component based architecture.
- There are different types of containers that exist :

1. Enterprise JavaBeans (EJB) container :
This is the container that manages the execution of the beans used for J2EE applications.

2. Web container :
This manages the page execution and other components used by the applications.

3. Application client container :
This controls and manages the application level components. These are used by the client and they run on the client side.

4. Applet container :
It is used to manage the applets that are executed by the web browser and uses Java plug-in.

What are the models provided by the J2EE?

The Interface that is used to provide remote connectivity to the database and the J2EE provides:
- Security model to allow the user to configure the web component to use the resource that can be accessed by the users that are permitted to use it.
- Transaction model allow the user to show the relationship between the methods to allow easy transaction that is treated as the single transaction.
- Lookup services, which allow easy identification of the interfaces to provide multiple naming and the directory services to the application that uses the components and access it.
- Remote connectivity model allow the user to manage the communications that are made at the low level between the clients and the beans. The bean gets created by the client that produces a method for executing an application.

What are the tools contained in J2EE to help develop an application?

- J2EE application creation requires some modules and tools that are created to deliver the archive file.
- The archive file is used with any archive manager but it is termed as the standard java archive file (JAR) that consists of the interfaces and components together in one.
- It consists of the application and deployment tools to create the EAR file and adding them in the JAR file. The tools that are used:

1. Deployment descriptors are used to contain the beans and the files that are related to each using the JAR archive container.
2. JAR file using the application client consists of the descriptors, class files and the application related data to be used to create an application.
3. WAR file is used to collect all the data at one place and populate it accordingly.

What are the tasks performed by J2EE enterprise Bean developer?

Enterprise Bean Developer platform uses many services for different components and it is always required that the task has to be mentioned such as:
- JAR file is an important file that consists of all the archived files and is used by the Java itself. It is used to perform the following tasks:
1. The source code has to be written and compiled properly.
2. The deployment descriptor is used to specify the application that need to run.
3. The class files that are of the extension .class file create a bundle and it is being bundled to be used as a single file. It requires the descriptor to be there in the JAR file.
1 2

J2EE application
J2EE application - Explain the components of J2EE architecture, Explain the Java Servlets. Explain its lifecycle, Explain JSP, Describe JSP lifecycle.
J2EE web container
J2EE web container - overview of web container, Java Servlet programming model, deployment descriptors...
J2EE Architecture
J2EE Architecture - Types of container, J2EE container architecture, Technologies that J2EE platform provides, J2EE APIs
Post your comment