Read an Excerpt
Chapter 1: Introudtion
The reasons for Java's success are compelling. It is truly platform-independent, a universal programming language for any operating system. It is completely object-oriented, leveraging advances in the software engineering and component technology disciplines. Its security model is mature and robust, in stark contrast to its virus-prone alternatives.Where Does Java Fit In?
The first wave of Java technology that caught attention was Java applets-small downloadable applications hosted by a Web browser. Applets have met with some disappointment, however. Browser incompatibilities lead to complexity, and download time can be significant. Security considerations can restrict the ability to perform necessary services. Applets' graphics capabilities land them in too many frivolous "eye candy" settings. However, as with other immensely popular technologies, the second wave is where the real value becomes apparent. In this case, it is the server side of the enterprise that has emerged as the most significant arena for Java. There are several reasons for this:
The server environment is where the database and business applications reside. Integration at this level is crucial, and Java's reliability, platform independence, and database connectivity are key considerations. The security environment is more manageable. There is no graphical user interface (GUI) to worry about. The most remarkable factor driving server-side Java, however, is the phenomenal growth of electronic commerce.
The Role of E-Commerce
What was not envisioned as few as 5 years ago was the emergence of e-commerce as a significant business model. Estimates of marketshare as recently as a year ago consistently underestimated the growth. According to the U.S. Department of Commerce, the proportion of U.S. companies that sell products over the Internet is expected to grow from 24 percent in 1998 to 56 percent during 2000.1 Online sales of computer products, stock trades, travel booking, mortgage loans, and retail products have all exceeded expectations. Compared with these business-toconsumer transactions, growth in business-to-business e-commerce is even more significant, with estimates of a staggering $1.3 trillion worldwide market by 2003.3 The convergence of three trends has been a key factor crucial to the rise of e-commerce:
1. Widespread access to the Internet at home and at work-as much as 37 percent of the U.S. population'
2. Online facilities for secure financial transactions
3. Availability of Web-connected application server software
It is the last of these factors that is creating the demand for server-side Java. The Gartner Group reports that Java servlets likely will be the most popular form of server-based Java because of the large volume of simple Internet application needs.5 This is the subject that this book addresses.
What This Book Is About This book deals with Java servlets and JavaServer Pages. Servlets are Java components that dynamically extend the capabilities of a Web server. JavaServer Pages (JSPs) are Web pages that contain both Hypertext Machine Language (HTML) and Java statements that handle application logic and database connectivity. Topics that are covered in detail include HTML clients. Using HTML to capture user input and convey it to a server. Database access. How Java Database Connectivity (JDBC) provides Java with industry-standard Structured Query Language (SQL) access to database management systems...