Preface


On a historical timeline, the saga of Java as a server-side programmer's tool of choice began in early 1997 when Sun Microsystems released the "Java ¢ Web Server" beta and Java Servlet Developers Kit. [1] Servlets are a type of Java class that executes on a server. Servlets dynamically handle networked requests and responses, mostly using the Hypertext Transfer Protocol (HTTP). In June 1999, Sun introduced JavaServer Pages (JSPs), which intermingled Java code with JavaScript and HTML template text.

[1] See Sun Microsystems Java milestones and history at: http://java.sun.com/features/2000/06/time-line.html.

JSPs, as they are now evolving (with JSP Version 2.0), are designed to encapsulate domain logic in standard and custom tags, and separate this domain layer from the JSP component's presentation logic. The latter concept means "the stuff that people see" when they interact with a web application, such as HTML- related screen widgets. Ideally, a JSP uses tags to interact with databases and encapsulate domain rules, and static or dynamically generated template text, such as XML or XHTML, to create the visual page for the user .

During the late 1990s, I was a freelance , backend web developer using a number of different languages. When server-side Java appeared on the scene, I greeted the news with as much relief as joy. Designed from the bottom up as object-oriented and modular, Java represented a reassuring alternative to the ad hoc, ill-designed, albeit well-intentioned masses of web-related code I would often encounter when an organization brought me into the midst of a project.

Not only can you easily create your own reusable components for, say, sending email simply by designing and uploading to your web application one or more Java classes, [2] but you have the entire Java API at your disposal for dealing with essential, low-level items such as String-handling, file I/O, and Math calculations. What a deal!

[2] For example, the installation of a binary Active Server Pages (ASP) component often required the scrutiny and permission of the hosting Internet Service Provider (ISP), because a badly written or malicious ASP component could wreak havoc on the server machine.

The other big benefit Java provides is its cross-platform nature. Web developers can design their web applications, neatly package them in a special JAR file for web components called a Web Application Archive file, then install the WARs on various servers hosted by different operating systems (OSes). Java web components are not bound to a single OS or to a particular vendor's server software like other web-related software technologies.

Jump ahead to the present. By late 2003, Java has achieved status as the granddaddy of server-side development. Servlets and JSPs are included in the Java 2 Enterprise Edition (J2EE), a widely accepted enterprise technology for network-based and distributed computing. Hundreds of thousands of developers throughout the world work on the "web tier " of J2EE-based technologies, using servlets, JSPs, and sometimes special web frameworks such as Struts.

In fact, many web developers now spend a fair amount of time getting to know various " application servers" ”like BEA WebLogic, JBoss, or IBM's WebSphere ”that pull together the web tier, business or domain objects (such as components that handle weather data or a customer's financial accounts), and Enterprise Information Systems (EIS). These application servers represent the software host for servlets and JSPs. Many web developers, including myself , spend a lot of time working on web components that are hosted on Tomcat, a popular open source (http://www.opensource.org) servlet engine and "reference implementation" for the new servlet and JSP APIs. [3]

[3] A reference implementation is software that is based on a commonly agreed upon specification, and is freely available to software developers and others as a demonstration of how the specified software system is designed to function.

The rapid maturation and well-established nature of Java has naturally led to a "cookbook" approach for our book. This cookbook focuses on how to initiate certain web-related tasks in Java, rather than tutoring the reader on how to use the Java language, or explaining the servlet and JSP APIs in finely grained detail. Countless tutorial-oriented Java books still exist, however, in new or reissued form, which attests to the popularity of Java as a web-development platform.



Java Servlet & JSP Cookbook
Java Servlet & JSP Cookbook
ISBN: 0596005725
EAN: 2147483647
Year: 2004
Pages: 326

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net