Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 472 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
472
Dung lượng
6,85 MB
Nội dung
this print for content only—size & color not accurate spine = 0.894" 472 page count EMPOWERING PRODUCTIVITY FOR THE JAVA ™ DEVELOPER Beginning JSP, ™ JSF, ™ and Tomcat ™ Web Development: From Novice to Professional Dear Reader, This book tells you what you need to know to develop Java™-based web applica- tions with JavaServer Pages™ (JSP ™ ), JavaServer™ Faces (JSF ™ ), and Tomcat. ™ In less than one and a half decades, the Web has become a platform capable of delivering complex and powerful applications. At the same time, a bewilder- ing variety of technologies and products has been introduced, all jostling for recognition and market share. We decided to write this manual on the basis of two considerations: one technical and one human in nature. The technical consideration was that the alignment of JSP 2.1 and JSF 1.2 achieved with Java Platform, Enterprise Edition 5 (Java EE 5), and the subsequent release of Servlet 2.5 and Tomcat 6, had finally realized full consistency across the whole platform. The human consideration was that, although a lot of information and documentation is available by searching the Web, there is a need for a compendium capable of taking a reader through all the steps necessary to build a Java-based web application. In our endeavor to cover all the subjects you’ll need, we have included chapters dedicated to HTML, JSP, databases, JSF, Tomcat, and XML, and sections on Java and HTTP. We’ve also touched on Cascading Style Sheets (CSS), JavaScript™, Asynchronous JavaScript and XML (Ajax), and Simple Object Access Protocol (SOAP) and provided detailed references for HTML, JSP, JSF, and SQL. This is a practical manual driven by examples rather than by abstract con- cepts. Nevertheless, we have consistently justified and explained every step taken and every choice made throughout the book. You’ll also discover useful tips and tricks to make your programming life easier. If you keep coming back to this book to look up techniques and to check out options and features, we will have achieved our goal. Happy programming! Giulio Zambon and Michael Sekler Giulio Zambon US $39.99 Shelve in Java Programming User level: Beginner–Intermediate JSP, ™ JSF, ™ and Tomcat ™ THE EXPERT’s VOICE ® IN JAVA ™ TECHNOLOGIEs Beginning JSP, ™ JSF, ™ and Tomcat ™ Web Development From Novice to Professional CYAN MAGENTA YELLOW BLACK PANTONE 123 C Giulio Zambon with Michael Sekler Companion eBook Available THE APRESS JAVA™ ROADMAP Pro JSF™ and Ajax Pro Apache Tomcat™ 6 Beginning JSP™, JSF™, and Tomcat™ Pro JSP™ 2, 4th Ed. www.apress.com java.apress.com SOURCE CODE ONLINE Companion eBook See last page for details on $10 eBook version ISBN-13: 978-1-59059-904-4 ISBN-10: 1-59059-904-7 9 781590 599044 5 3 9 9 9 Learn and apply the very fundamentals of Java ™ Web development using JSP ™ and JSF ™ API, and deployment using Apache Tomcat ™ 6 server. Beginning Zambon, Sekler [...]... in software engineering and is a licensed private pilot xix 9047fmfinal.qxd 10/26/07 8:53 PM Page xx 9047fmfinal.qxd 10/26/07 8:53 PM Page xxi Introduction W elcome to Beginning JSP JSF, and Tomcat Web Development: From Novice to Professional , This book has the ambitious goal of teaching you how to develop dynamic web pages with JavaServer Pages (JSP) 2.1 and JavaServer Faces (JSF) 1.2 This is easier... services, and he used JSP and Tomcat exclusively to develop the web side of the service platform He has lived and worked in nine cities of five countries, can speak four languages fluently, and is a dedicated Trekker sMICHAEL SEKLER graduated from the University of Western Australia in 1987 and has worked as a software engineer, developer, software architect, and consultant for several large and small... because to use JSP and JSF, you need to know at least some Java, HTML, XML, and SQL Moreover, some knowledge of JavaScript and Cascading Style Sheets (CSS) would also be useful, and you couldn’t fully exploit the power of JSP /JSF without knowing the JSP Expression Language (EL) and the XPath language To cover all this ground, we’ve decided to relegate most of the details to appendixes and use the main... bring together the pieces we’ve shown in the preceding chapters and give you the last missing bits In Appendix A, we explain how to download and install all the packages you need: Java, JSP, Tomcat, SQL, and so on xxi 9047fmfinal.qxd xxii 10/26/07 8:53 PM Page xxii sINTRODUCTION Appendixes B, C, D, and E describe HTML character sets, HTML, JSP, and SQL, respectively This is where you’ll find the details... JAVASERVER PAGES AND TOMCAT Figure 1-2 Viewing a JSP page The following steps explain how the web server creates the web page: 1 As with a normal page, your browser sends an HTTP request to the web server This doesn’t change with JSP although the URL probably ends in jsp instead of html , 2 The web server is not a normal server, but rather a Java server, with the extensions necessary to identify and handle Java... Java and HTML, as in “Hello World!,” is that the application logic and the way the information is presented in the browser are mixed In general, the business application designers and the web page designers are different people with complementary and only partly overlapping skills While application designers are experts in complex algorithms and databases, web designers focus on page composition and. .. responses, and sends the responses back to the network The Apache Software Foundation (ASF) developed the Apache Tomcat application server to provide an environment in which servlets can execute Tomcat is also capable of converting JSP documents into servlets In this chapter, we’ll introduce you to Java servlets and JSP and we’ll show you how they , execute together within Tomcat to generate dynamic web pages... generate dynamic web pages We’ll barely scratch the surface of both JSP and Tomcat, and we won’t even mention JSF We’ll show you how to develop applications with basic tools, rather than in an environment that takes care of most menial tasks and provides sophisticated checking and debugging capabilities This will give you a better understanding of what modern tools can do for you We know that you’re eager... JAVASERVER PAGES AND TOMCAT What Is JSP? As we said, JSP is a technology that lets you add dynamic content to web pages Without JSP, you always have to update the appearance or the content of plain static HTML pages by hand Even if all you want to do is change a date or a picture, you must edit the HTML file and type in your modifications Nobody is going to do it for you, whereas with JSP, you can make... with JSF 1.2, while Java SE 5 provides the foundation classes, and Servlet 2.5 includes a library to handle HTTP requests 9047ch01final.qxd 10/26/07 9:20 PM Page 3 CHAPTER 1 s INTRODUCING JAVASERVER PAGES AND TOMCAT Viewing a Web Page To understand JSP you first need to have a clear idea of what happens when you ask your , browser to view a web page, either by typing a URL in the address field of your . with Michael Sekler Beginning JSP ™ , JSF ™ , and Tomcat Web Development From Novice to Professional 9047fmfinal.qxd 10/26/07 8:53 PM Page i Beginning JSP™, JSF , and Tomcat Web Development: From. Programming User level: Beginner–Intermediate JSP, ™ JSF, ™ and Tomcat ™ THE EXPERT’s VOICE ® IN JAVA ™ TECHNOLOGIEs Beginning JSP, ™ JSF, ™ and Tomcat ™ Web Development From Novice to Professional . JAVA ™ DEVELOPER Beginning JSP, ™ JSF, ™ and Tomcat ™ Web Development: From Novice to Professional Dear Reader, This book tells you what you need to know to develop Java™-based web applica- tions