Saturday, October 10, 2009

Beginning JSP 2: From Novice to Professional

Beginning JSP 2: From Novice to Professional
by Peter den Haan, Lance Lavandowska, Sathya Narayana Panduranga and Krishnaraj Perrumal   ISBN:1590593391
Apress © 2004 (480 pages)

Welcome to Beginning JSP 2: From Novice to Professional. This book is for novices and teaches JavaServer Pages (JSP) 2 using basic principles. You don't need to know any Java to use this book because JSP 2 is a significant development of the JSP technology that has greatly reduced JSP's reliance on Java knowledge. However, to get the most out of supporting technologies and maximize your JSP applications, you need to know some basic Java techniques. We'll teach you these techniques and show you when and where to use the Java language.

The JSP 2 specification is the biggest revision of JSP since its creation. It's now easier for nonprogrammers to build powerful, dynamic Web applications. The authors of this book realize that JSP 2 is a tremendously powerful tool but that it's also a daunting prospect for many nonprogrammers. In response to this, the authors have written an easily accessible guide for those who are beginning their career in Web programming. This book introduces all the important concepts without fuss or overcomplication and always keeps the readers' best interests at heart.

Chapter 1 takes you through the Java and JSP installation processes so you're ready for the rest of the book. Chapter 2 is a Hypertext Markup Language (HTML) recap, which will act as a useful reference for those who already know a little HTML. After running through the basics, the book moves through simple JSP pages in Chapter 3 to working with data in Chapter 4, probably the most common and important task you'll have to undertake when using JSP. After all, what's the point of using dynamic Web pages if you have no dynamic data on which to work?

Chapters 5 and 6 introduce your first Java and show you how to use simple Java utility code to enhance your JSP pages. The emphasis is always on JSP and how Java fits into the new JSP 2 framework. Throughout these chapters you'll slowly build and incrementally improve an application that uses HTML forms, databases, and validation. The book explains each stage and introduces good practice as you learn new techniques.

Chapters 7 and 8 introduce more advanced JSP techniques and use the newly incorporated JSP Tag Library (JSTL) tags to work with dates, times, and formatting. Chapter 8 introduces Extensible Markup Language (XML), the ubiquitous data description specification, and JSP's tools for dealing with it. XML is such an important part of modern Web applications that it's essential in any beginner's handbook. You'll soon find that XML is an inescapable part of today's Web.

Chapters 9 and 10 cover topics that will ensure your applications are well designed and flexible. Specifically, Chapter 9 covers servlets and filters, both of which are Java classes that run alongside JSP pages and add robust functionality to any Web application. Chapter 10 introduces the Model-View-Controller design concept and the Struts framework, which implements it for JSP pages. By using Struts you instantly add good design and flexibility without any of the hard work usually associated with scalable Web applications.

By the time you've finished the book, you'll have an example Web application for taking data, validating it, storing it in a database, and reporting back to the user. However, the real benefit will be in the design under the covers. Your application will use good practice throughout and can form the basis for many similar applications in the future.

I hope you enjoy reading this work and that you have every success in the future.

Matthew Moodie, Editor

Download the free chm ebook: Beginning JSP 2: From Novice to Professional

Tags: java, jsp


Saturday, October 10, 2009

Free chm ebook download: Pro JSP, Third Edition

Pro JSP, Third Edition
by Simon Brown et al.   ISBN:1590592255

Welcome to the third edition of Pro JSP, designed to help new and experienced Java developers alike discover the power (and even the joy) of creating Java-based server-side solutions for the Web. If you've programmed with JSP before you'll find that the new features in JSP 2.0 make developing JSP pages easier then ever before and if you only know a little Java then this is your chance to add JSP to your toolbox skills.

JavaServer Pages, or JSP for short, is a server-side technology that takes the Java language, with its inherent simplicity and elegance, and uses it to create highly interactive and flexible web applications. In today's unsure economic climate, having the Java language behind it makes JSP particularly compelling for business: Java is an open language, essentially meaning it doesn't require expensive licenses and thus JSP solutions can be highly cost-effective.

The founding premise of JSP is that HTML can be used to create the basic structure of a web page, and Java code can be mixed in with it to provide the dynamic components of the page that modern web users expect. If you have an understanding of the concepts of HTML and web pages, JSP provides an unbeatable way to learn about creating innovative, interactive content as well as coming to grips with the popular language of Java. This book will be your guide as you step into this exciting new world.

Who Is This Book For?

This book is aimed at anyone who knows the Java language and core APIs and wants to learn about web programming with the latest versions of the JSP and Servlet APIs.

Familiarity with HTML is required; however, no prior knowledge of server-side Java programming is necessary. Having said that, this book does not claim to be exhaustive in all areas, particularly in relation to other Java APIs such as Enterprise JavaBeans.

This book covers the latest versions of the JSP and Servlet specifications–versions 2.0 and 2.4 respectively, both of which are new specifications developed through the Java Community Process (http://java.sun.com/aboutJava/communityprocess/).

 Note  It's possible that some small changes might be made before they're finally released; however, any modifications are likely to be minor and the new specifications are already being implemented by a number of products such as Tomcat 5.0.
 

Those who have read previous editions of this book will notice that this edition is not a revision of Professional JSP, 2nd Edition; rather, it has been "re-coded from the ground up" to address the newest features of Java web development. A lot has changed since the second edition, which was only published back in April 2001!

If you already have some exposure to server Java web development, you should pay attention to any changes in the technologies that are indicated throughout the book, or skip ahead to the sections that interest you the most. On the other hand, if you're new to JSP, servlets, and JSTL, and this is somewhat confusing, you've come to the right place; the early chapters in this book, especially, were written with you in mind.

The book's chapters can be summarized as follows:

Chapter 1, The Anatomy of a JavaServer Page, looks at the JSP life cycle, JSP application architecture, and the fundamentals of JSP pages, and provides a feel for where JSP technology fits within the J2EE and other web components such as servlets, tag libraries, and JavaBeans, which exist in the J2EE web tier for providing dynamic web-based content.

Chapter 2, Servlets and Deployment, delves into what Java servlets are, and looks at the development and deployment of Java servlets. The Servlet and JSP specifications are developed in parallel, and this chapter is up to date for the latest release of JSP 2.0 and Servlets 2.4 (as is the rest of the book).

We discuss one of the new features of the JSP 2.0 specification in the appropriately named Chapter 3, The JavaServer Pages Expression Language. The JSP expression language is what you'll be using most often in JSP pages, an intentionally simple language that is, to a large extent, independent of JSP.

Chapter 4, JavaServer Pages Standard Tag Library, looks at the reasons for the creation of the JSTL, its details (it is in fact four different tag libraries), and how to install the JSTL and Tomcat 5.0.

Tag Files and Simple Tags is the title of Chapter 5. In the same way that the tags contained within JSTL are extremely valuable for improving the readability and maintainability of a JSP page, you can build your own custom tags to enable your own functionality to be reusable and easily maintained. Tag files and simple tags are both new mechanisms for writing custom tags introduced as a part of the JSP 2.0 specification.

Chapter 6, Classic Tags, takes a look at the facilities provided by former versions of the JSP specification for writing custom tags. As you'll see throughout the chapter, these previous methods, now called classic tags, provide a great deal more flexibility and for this reason are still useful in some scenarios.

Now that you've seen the basics of building custom tags, Chapter 7, Custom Tag Advanced Features and Best Practices, wraps up your understanding by looking at some more advanced features and the best way to use custom tags.

Chapter 8, Data Access Options for Web Applications, discusses how best to access your back-end data from your JSPs and servlets. No matter what type of JSP application you're writing, you'll need to either store the data that is created by your application, or use data from an external source, and this chapter looks at examples using a MySQL database.

In Chapter 9, Introduction to Filtering, you'll look at filtering, a standard feature of all Servlet 2.4-compliant containers. You'll explore the life cycle of a filter as managed by the container, discuss the very important concept of filter chaining, and then create and deploy two simple filters as a foundation for Chapter 10, Advanced Filtering Techniques. Chapter 10 acts as a cookbook for the application of filters, as you turn your attention to the more advanced techniques involved in applied filter programming by looking at five examples that can be used as the basis for your own filter implementation.

Chapter 11, Security in Web Applications, looks at making your web applications secure and exploring different methods of authentication and authorization.

Chapter 12, Improving Web Application Performance and Scalability, is your guide to a number of well-known tools and techniques such as page caching and database connection pooling that you can use to improve performance and stability, even after you've designed and coded your application.

Chapter 13, Web Application Design and Best Practices, brings together the techniques covered in the earlier chapters and shows how to build maintainable, extensible Java-based web applications. It looks at the importance of good design and how it can help you build high-quality web applications that are easier to maintain and extend in the future.

In Chapter 14, Using Struts, Xdoclet, and Other Tools, you'll develop a resume building and viewing (web) application called struts-resume, using a variety of third-party products. All of the products used in struts-resume are open source and help to facilitate and speed up various stages of the development process.

Download the free chm ebook: Pro JSP, Third Edition

Tags: java, jsp