Even though it seems like Java is mainly the desktop language, it is used quite extensively to create web application. This is done using the Java Enterprise Edition. According to W3Tech, Java is the server-language of choice for large-scale websites with a high volume of traffic. Java Servlets, JSP and WebObjects are some of the solutions on the server side which use Java. An important reason why Java is used among sites with such workload is the speed it offers. Let’s have a brief look at Java’s most used technologies for the web.
• Java Servlet API - The Java Servlet API enables you to define HTTP-specific classes. A servlet class extends the actual capabilities of servers that host applications that are accessed by way of a request-response 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 might use a servlet to get the text input from an online form and print it back to the screen in an HTML page and format, or you might use a different servlet to write the data to a file or database instead. A servlet runs on the server side - without an application GUI or HTML user interface (UI) of its own.
• JavaServer Pages Technology - JavaServer Pages (JSP) technology provides a simplified, quick way to create dynamic web content. JSP technology enables rapid development of web-based applications that are server and platform independent. JSP technology lets you add snippets of servlet code directly into a text-based document. Typically, 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,
Wireless Markup Language (WML), or XML JSP technology elements, which determine how the page constructs dynamic content
• Java Message Service API - Messaging is a method of communication between software components or applications. A messaging system is a peer-to-peer facility. In other words, a messaging client can send messages to and receive messages from any other client. Each client connects to a messaging agent that provides facilities for creating, sending, receiving, and reading messages. By combining Java technology with enterprise messaging, the Java Message Service (JMS) API provides a powerful tool for solving enterprise computing problems.
• Java API for XML Processing - The Java API for XML Processing (JAXP), part of the Java SE platform, supports the processing of XML documents using the Document Object Model (DOM), the Simple API for XML (SAX), and Extensible Stylesheet Language Transformations (XSLT). JAXP enables applications to parse and transform XML documents independent of a particular XML-processing implementation.
• Java Persistence API - The Java Persistence. API is a Java technology standards-based solution for persistence. Persistence uses an object-relational mapping approach to bridge the gap between an object-oriented model and a relational database. Java technology persistence consists of three areas:
– The Java Persistence API
– The query language
– Object-relational mapping metadata