Servlet singlethreadmodel deprecated
It’s difficult to make a web-based application as seamless as a desktop application when the user must jump through a series of discrete pages and it is technically more challenging to maintain application data across those pages.
Standards for HTML and Java Script have matured to the point where it is practical to write applications in which most of the user interface and logic reside on the client side and background calls are made to the server for data and services.The Servlet API is used in both Java web applications and often in the implementation of application-to-application web services.We’ll deal with servlets directly in the first part of this chapter, when writing examples used from a web browser.This is a very appealing model of software deployment facilitated by the increased standardization and power of HTML and Java Script in web browsers as well as higher-speed Internet connectivity and better application-to-application web service standards.Most of this chapter is about the mechanics of the Servlet API, which is a Java framework for writing application components for servers.NET and alternatives such as Ruby on Rails for building web application components.
However, the overriding trend in web applications today is to focus less on the server technology and more on client-side technologies such as Java Script and HTML5 in communication with server-side components and web services regardless of the implementation language.
Servers that support the full set of Java Enterprise APIs including servlets, web services, JSPs, and older technology like Enterprise Java Beans are called .
JBoss is a free, open source Java application server, and BEA’s Web Logic is a popular commercial application server.
Java Script also makes asynchronous (background) calls to the server to fetch data and invoke services.
In many cases, the results are returned as XML, leading to the term (AJAX) for this style of interaction.
Later, we’ll look at application-level web services that are designed to provide data and services to all types of client applications in a more behind-the-scenes fashion.