Feb 10, 2008

Java Servlet & JSP Cookbook


What's in the Book :
Java Servlet & JSP Cookbook
?
In creating the recipes for this book and tutorial, This book to cover as many common and advanced web developer tasks as Java Servlet & JSP Cookbook could practically fit into one book. This amounts to about 230 different recipes. Each recipe shows how to implement a particular task using servlets, JSPs, and, in many cases, one or more supporting Java classes.

The recipes show how to:

•Authenticate web clients
•Interact with databases
•Send email
•Handle submitted data from a web form
•Read and set "cookies"

•Upload files from the client
•Integrate JavaScript with servlets and JSPs

•Embed multimedia files like digital movies and music in JSPs and servlets •Handle web clients whose users speak different languages (internationalization) •Log messages from servlets and JSPs
•Dynamically include chunks of content, as in traditional server-side include (SSI) code
•Interact with Enterprise JavaBeans (EJBs) from a JSP and servlet

•Use Amazon.com's and Google.com's Web Services APIs from a servlet or JSP

Java Servlet & JSP Cookbook also included numerous technology-specific recipes, such as:
•Using "sessions" in your Java web applications (a concept that represents the tracking of a user's progress through a web site)
•Working with "filters"

•Using the open source ANT tool to build web applications
•Binding Java objects to a session or web application so they can be used as information or data containers
•Creating your own custom tags for JSPs
•Using the JavaServer Pages Standard Tag Library (JSTL), which is a large set of prebuilt tags you can use in JSPs

In short, the book is designed to help guide Java web developers in their everyday tasks, and to provide quick solutions to typical web-related problems.

BEA WebLogic Recipes :
Because Java web developers tend to work with both Tomcat and a proprietary application server, Java Servlet & JSP Cookbook included a number of different recipes to show how to implement common tasks with BEA WebLogic. As a practical matter, This book could not cover the several other application servers that are available, such as IBM's WebSphere, JBoss, Jetty, Oracle 9i application server, or commercial servlet engines such as New Atlanta ServletExec and Caucho Resin. But this book wanted to include recipes covering "how the other half lives" in terms of using various vendor tools for managing everyday web-application tasks. Solutions involving the deployment or revision of web components and deployment descriptors using visual interfaces such as WebLogic's Administration Console or WebLogic Builder can be quite different from those used with Tomcat.

Downloads Java Servlet & JSP Cookbook
Java Servlet & JSP Cookbook
Pub Date : January 2004
Pages : 746

Filetype : pdf


Feb 9, 2008

Core Servlets and Java Server Pages

Free download vtc java 2: jsp and servlets
Ebooks and tutorial Core Servlets and Java Server Pages (JSP) is divided into three parts: Servlets, JavaServer Pages, and Supporting Technologies.

Part I: Servlets
Part I covers servlet development with the 2.1 and 2.2 specifications.
Although version 2.2 (along with JSP 1.1) is mandated by the Java 2 Platform, Enterprise Edition (J2EE), many commercial products are still at the earlier releases, so it is important to understand the differences.
Also, although servlet code is portable across a huge variety of servers and operating systems, server setup and configuration details are not standardized.
So, I include specific details for Apache Tomcat, Sun’s JavaServer Web Development Kit (JSWDK), and the Java Web Server.

Servlet topics include:
• When and why you would use servlets
• Obtaining and configuring the servlet and JSP software
• The basic structure of servlets
• The process of compiling, installing, and invoking servlets
• Generating HTML from servlets
• The servlet life cycle
• Page modification dates and browser caches
• Servlet debugging strategies
• Reading form data from servlets
• Handling both GET and POST requests with a single servlet
• An on-line resume posting service
• Reading HTTP request headers from servlets
• The purpose of each of the HTTP 1.1 request headers
• Reducing download times by compressing pages
• Restricting access with password-protected servlets
• The servlet equivalent of each standard CGI variable
• Using HTTP status codes
• The meaning of each of the HTTP 1.1 status code values
• A search engine front end
• Setting response headers from servlets
• The purpose of each of the HTTP 1.1 response headers
• Common MIME types
• A servlet that uses the Refresh header to repeatedly access ongoing computations
• Servlets that exploit persistent (keep-alive) HTTP connections
• Generating GIF images from servlets
• Cookie purposes and problems
• The Cookie API
• Some utilities that simplify cookie handling
• A customized search engine front end
• The purposes of session tracking
• The servlet session tracking API
• Using sessions to show per-client access counts
• An on-line store that uses session tracking, shopping carts, and pages automatically built from catalog entries

Part II: JavaServer Pages
JSP provides a convenient alternative to servlets for pages that mostly consist of fixed content.
Part II covers the use of JavaServer Pages version 1.0 and 1.1.
JSP topics include:
• When and why you would use JavaServer Pages
• How JSP pages are invoked
• Using JSP expressions, scriptlets, and declarations
• Predefined variables that can be used within expressions and scriptlets
• The page directive
• Designating which classes are imported
• Specifying the MIME type of the page
• Generating Excel spreadsheets
• Controlling threading behavior
• Participating in sessions
• Setting the size and behavior of the output buffer
• Designating pages to process JSP errors
• XML-compatible syntax for directives
• Including JSP files at the time the main page is translated into a servlet
• Including HTML or plain text files at the time the client requests the page
• Including applets that use the Java Plug-In
• Using JavaBeans with JSP
• Creating and accessing beans
• Setting bean properties explicitly
• Associating bean properties with input parameters
• Automatic conversion of bean property types
• Sharing beans among multiple JSP pages and servlets
• Creating JSP tag libraries
• Tag handler classes
• Tag library descriptor files
• The JSP taglib directive
• Simple tags
• Tags that use attributes
• Tags that use the body content between their start and end tags
• Tags that modify their body content
• Looping tags
• Nested tags
• Integrating servlets and JSP
• Forwarding requests from servlets to static and dynamic resources
• Using servlets to set up beans for use by JSP pages
• An on-line travel agency combining servlets and JSP
• Including JSP output in servlets
• Forwarding requests from JSP pages

Part III: Supporting Technologies
Part III covers three topics that are commonly used in conjunction with servlets and JSP: HTML forms, applets talking to servlets, and JDBC.
Topics include:
• Sending data from forms
• Text controls
• Push buttons
• Check boxes and radio buttons
• Combo boxes and list boxes
• File upload controls
• Server-side image maps
• Hidden fields
• Grouping controls
• Tab ordering
• A Web server for debugging forms
• Sending GET data from an applet and having the browser display the results
• Having applets send GET data and process the results themselves (HTTP tunneling)
• Using object serialization to exchange high-level data structures between applets and servlets
• Having applets send POST data and process the results themselves
• Applets bypassing the HTTP server altogether

Download Core Servlets and Java Server Pages
Filetype : pdf
Page : 617
Size : 6.684 KB

Jan 26, 2008

JavaServer Pages™, Second Edition


JavaServer Pages™ , Second Edition is a book and tutorial about how to use an exciting and powerful technology, JavaServer Pages, (JSP Tutorial) to create dynamic, interactive Web sites. As the name implies, this technology is based on the Java programming language and inherits many of the language's features and benefits. Most notably, Java makes JSPs available on almost every kind of computer and operating system and certainly all those in common use.

Java Server Pages are now a mature and stable technology, already in use in thousands of companies. But maturity has certainly not led to stagnation! Recently, a new version of the JSP specification was released, bringing new capabilities and possibilities. In addition, several companion technologies have been developed to augment the fundamental specification. The new specification, as well as the most important of these associated technologies, are all covered in this book. Throughout this book, effort has been made to show the capabilities of all these tools and to discuss how they can best be used.

One of the most important features of Java Server Pages is how easy they are to use. Anyone who is reasonably comfortable with HTML (Hypertext Markup Language) can learn to write Java Server Pages by using a few simple tags that may do very sophisticated things behind the scenes, along with small packages of code called JavaBeans. This allows for a very productive working relationship between HTML experts who build pages and Java programmers who build beans and new tags.

Chapter 1 :
Gives a brief history of the Web, setting JSPs in context and clarifying what they are, how they work, and why they work that way.

Chapter 2 :
Introduces some of the simpler features of JSPs and shows just how easy the transition from HTML to JSP. The next two chapters introduce the two vital technologies that give JSPs their enormous power and flexibility: JavaBeans in Chapter 3 and custom tags in Chapter 4. These tags are presented as page authors will use them: components that hide all the complexities of Java behind simple interfaces that can be combined and used in limitless ways.

Chapter 5 :
Uses beans and tags to build a fully functional Web site. One of the great benefits of JSPs is that they make it possible for pages to interact with complex systems. A very common such system is a database.

Chapter 6 :
Introduces database concepts and discusses easy ways in which a page author can access data.

Chapter 7 :
Uses this information to expand the utility of the site built in Chapter 5. XML (Extensible Markup Language) is an increasingly important technology, and JSPs are already well equipped to work with XML.

Chapter 8.

The first eight chapters comprise a logical first half of the book, dealing with the myriad things page authors can do with JSPs without knowing anything about Java. The remainder of the book delves under the hood to explain how all this is accomplished and how Java programmers can extend the capabilities of JSPs. For readers who are not yet familiar with Java,

Chapter 9 :
Introduces the language.
Chapter 10 :
Overs the process of creating new beans.

Chapter 11 :
Covers a technology, called servlets, that underlies JSPs.

Chapter 12 :
To talk about controllers, Java code that helps pieces of a Web site work together simply and cleanly.

Chapter 13 :
Discusses how to use Java to create new tags.

Chapter 14 :
Covers a few remaining advanced topics.
Readers who are not interested in programming will get the most out of this book by reading Chapters 1 through 9, which comprise a complete course on how to use JSPs, beans, tags, and related technologies to build just about any Web site imaginable.
At thatpoint, such readers may wish to learn a little Java from Chapter 9 and then proceed on through the rest of the book in order to understand better how everything works.
On the other hand, readers who already know Java but who may not be familiar with JSPs, the new features added as part of the latest specification, or related technologies will want to move quickly through Chapter 2 to get a feel for JSP syntax and then go through Chapters 3 and 4 to see how JSPs interface with Java via tags and beans.
Programmers may then wish to proceed to Chapter 10 to see how new beans are created, and from there through the second half of the book in order to understand servlets and tags.

Download JavaServer Pages™, Second Edition
Pub Date : August 15, 2003
Pages : 368
Filetype : pdf
Size : 1,226 KB