J2EE Technologies

J2EE Technologies

The Java technologies that you will use to create web applications are part of the Java EE platform, as well as many classes and packages of the Java platform, Standard Edition (Java SE). For many of these technologies to work on a server, the server must have a container or Web server installed that recognizes and executes the created classes. To develop and test these technologies, you can use the tools detailed in this article, but when deploying, verify that the server has Java server software installed to run web applications based on Java technology. If you do not have access to this information, ask the server administrator.

Java technologies for use in Web applications

There are many Java technologies to list in an article, so this article will only describe the most used ones. The number of technologies listed here can seem overwhelming. Keep in mind that you will not have to use all of them. In reality, a web application usually consists of nothing more than a page created with JavaServer Pages (JSP) technology. Sometimes three or more of these technologies are combined. No matter how many you end up using, it is good to know what is available to you and how you can use each of them in a web application.

Java servlet API

The Java Servlet API allows you to define specific HTTP classes. A servlet class extends the resources of servers that host applications that are accessed through a response request programming model. Although servlets can respond to any type of request, they are commonly used to extend applications hosted by web servers.

For example, you can use a servlet to get the text input of a form online and print it on the screen in an HTML page and format, or use a different servlet to write the data to a file or database. A servlet runs on the server side – without an application GUI or its own user interface (UI) HTML. Java Servlet extensions make many web applications possible.

The javax.servlet and javax.servlet.http packages provide the classes and interfaces to define the servlets. The HTML servlet classes extend the abstract class javax.servlet.http.HttpServlet, which provides a structure for manipulating the HTTP protocol.

JavaServer Pages technology

JavaServer Pages (JSP) technology provides a simplified and fast way to create dynamic Web content. JSP technology allows the rapid development of web-based applications that are independent of the server and the platform. JSP technology allows you to add servlet code snippets directly into a text-based document. Normally, a JSP page is a text-based document that contains two types of text:

Static data, which can be expressed in any text-based format, such as HTML, Markup Markup Language (WML) or XML

JSP technology elements, which determine how the page builds dynamic content

The packages involved in creating JSP pages are javax.el, javax.servlet.jsp, javax.servlet.jsp.el ejavax.servlet.jsp.tagext, although you rarely have to import directly. A JSP page can be as simple as a bit of HTML with a JSP snippet and the .jsp extension of the page name.

For example, you can create a JSP technology page site that uses a snippet of code to include the header.html file, which contains the site navigation. In this way, when a link is changed to a button in the navigation, a change is made to a file and this file is loaded in all the pages of the site that have this code fragment:

<% @ include file = “header.html”%>

This line of code works a lot like a server-side inclusion if you’re familiar with them. Since this web page is now a JSP page, you can also add more Java technology code to create dynamic Web content, such as surveys, forms, ways to insert or retrieve data from a database, and so on.

JavaServer Pages Standard tag library

The JavaServer Pages standard tag library (JSTL) encapsulates the main functionality common to many applications based on JSP technology. Instead of mixing tags from multiple vendors in your applications, a single set of standard tags is used. This standardization allows you to implement your applications in any JSP container that supports the JSTL and increases the likelihood that the implementation of the tags will be optimized.

The JSTL has iterative and conditional tags to manipulate flow control, tags to manipulate XML documents, internationalization tags, tags to access databases using SQL, and tags for commonly used functions.

The packages that you can access to use JSTL are javax.servlet.jsp.jstl.core, javax.servlet.jsp.jstl.fmt, javax.servlet.jsp.jstl.sql and javax.servlet.jsp.jstl.tlv.

JavaServer Pages Faces Technology

JavaServer Faces technology is a user interface structure for the creation of web applications. The main components of JavaServer Faces technology involve a structure of GUI components, a flexible model to represent components in several languages ​​and marking technologies and a standardRenderKit to generate HTML markup.

This functionality is available through standard Java APIs and XML-based configuration files. In addition, the Sun Java Studio Creator IDE leverages JavaServer Faces technology in its drag-and-drop GUI tools, allowing you to use the technology without having to write or understand the underlying code.

Java Message Service API

Messages are a method of communication between software components or applications. A messaging system is a peer-to-peer resource. In other words, a messaging client can send and receive messages from any other client. Each client connects to a messaging agent that provides resources to create, send, receive and read messages. By combining Java technology with corporate messages, the Java Message Service (JMS) API provides a powerful tool for solving corporate computing problems.

The corporate messaging system provides a reliable and flexible service for the exchange of business data throughout the company. The JMS API adds to this a common structure of API and provider that allows the development of portable applications based on messages in the Java programming language. An example of how the JMS can be used is an application that tracks the inventory of an automobile manufacturer. The stock component can send a message to the factory component when the inventory level of a product is below a certain level. more cars. The factory component can send a message to the parts components so that the factory can assemble the necessary parts. Parts components can send messages to their own stock and request components to update their stocks and request new supplier parts. in front.

The JMS API improves the productivity of the programmer by defining a common set of message concepts and programming strategies that all messaging systems compatible with JMS technology will support.

JavaMail API and JavaBeans Activation Framework

Web applications can use the JavaMail API to send notifications by email. The API has two parts: an application-level interface that application components use to send email and a service provider interface. Service providers implement specific email protocols, such as SMTP. Several service providers are included in the JavaMail API package and others are available separately. The Java EE platform includes the JavaMail extension with a service provider that allows the components of the application to send email.

In combination with the JavaMail extension, you can use the JAF API (JavaBeans Activation Framework). This API provides standard services to determine the type of an arbitrary part of data, encapsulate access to it, discover the operations available in it and create the appropriate component based on the architecture of the JavaBeans component (JavaBeans component) to perform these operations.

Interested in learning Java? Join now:” java training in chennai “


The JDBC API allows you to call the SQL commands from the database of the Java programming language methods. You can use the JDBC API in a servlet, a JSP technology page, or a bean company when you have access to the database.

The JDBC API has two parts: an application-level interface that the application components use to access a database and a service provider interface to connect a JDBC driver to the Java EE platform.

The left side of Figure 2 shows how a client makes a direct call to the application server, usually through a servlet or JSP page, and this data is sent to the database management system server (DBMS). The right side of Figure 2 shows how a driver converts JDBC calls into the middleware provider’s protocol.

Interested in learning Java? Join now:” java training in bangalore 

Java Naming and Directory Interface

The JNDI (Java Naming and Directory Interface) provides name and directory functionality, allowing applications to access various naming and directory services. It provides applications with methods to perform standard directory operations, such as associating attributes with objects and searching for objects through their attributes. Using JNDI, a web application can store and retrieve any type of named Java technology object, allowing applications to coexist with many legacy applications and systems.

Naming services provide application clients, corporate beans, and web components with access to a JNDI naming environment. A naming environment allows the developer to customize a component without having to access or change the source code of the component. A container implements the environment of the component and provides it to the component as a JNDI nomenclature context.

Other Technologies to Consider

You may want to consider using the following technologies in your web application, depending on the complexity of the application:

  • J2EE Connector Architecture: System vendors and tools providers use this architecture to create resource adapters that support access to corporate information systems that can be connected to any product based on Java EE technology.
  • JAAS (Java Authentication and Authorization Service): JAAS provides a way for an application based on Java EE technology to authenticate and authorize a specific user or group of users to execute it.
  • Java API for XML registries (JAXR): JAXR allows access to business and general purpose records through the web.
  • Java architecture for XML Binding (JAXB): JAXB provides a convenient way to link an XML schema to a representation in applications written in the Java programming language.
  • SOAP with Attachment API for Java (SAAJ): SAAJ is a low level API on which JAX-WS and JAXR depend.
  • Java Transaction API (JTA): The JTA provides a standard interface to demarcate transactions.


To getting expert-level training for Java Training in your location – java training in Chennai | java training in Bangalore  | java training in Pune | java training in Chennai | java training in Bangalore | java training in Chennai | java interview questions and answers |  core java interview questions and answers | java training in Chennai | For getting java online training | java online training