0
    JavaServer Pages: Help for Server-Side Java Developers

    JavaServer Pages: Help for Server-Side Java Developers

    4.5 4

    by Hans Bergsten


    eBook

    $19.99
    $19.99
     $35.99 | Save 44%

    Customer Reviews

      ISBN-13: 9781449378974
    • Publisher: O'Reilly Media, Incorporated
    • Publication date: 12/11/2003
    • Sold by: Barnes & Noble
    • Format: eBook
    • Pages: 768
    • File size: 6 MB

    Hans Bergsten is the founder of Gefion Software, a company focused on Java services and products based on the J2EE technlogies. Hans has been an active participant in the working groups for both the servlet and JSP specifications from the time they were formed. He also contributes to other related JCP specifications, such as JSP Standard Tag Libraries (JSTL), and helped get the development of the Apache Tomcat reference implementation for servlet and JSP started as one of the initial members of the Apache Jakarta Project Management Committee.

    Table of Contents

    Prefacexi
    Part I.JSP Application Basics
    1.Introducing JavaServer Pages3
    What Is JavaServer Pages?3
    Why Use JSP?4
    What You Need to Get Started10
    2.HTTP and Servlet Basics11
    The HTTP Request/Response Model11
    Servlets19
    3.JSP Overview23
    The Problem with Servlets23
    The Anatomy of a JSP Page25
    JSP Processing26
    JSP Application Design with MVC30
    4.Setting Up the JSP Environment32
    Installing the Java Software Development Kit32
    Installing the Tomcat Server33
    Testing Tomcat37
    Installing the Book Examples39
    Example Web Application Overview40
    Part II.JSP Application Development
    5.Generating Dynamic Content45
    Creating a JSP Page45
    Installing a JSP Page46
    Running a JSP Page48
    Using JSP Directive Elements48
    Using Template Text51
    Using JSP Action Elements51
    6.Using JavaBeans Components in JSP Pages58
    What Is a Bean?58
    Declaring a Bean in a JSP Page60
    Reading Bean Properties61
    Setting Bean Properties64
    7.Using Custom Tag Libraries and the JSP Standard Tag Library68
    What Is a Custom Tag Library?68
    Installing a Custom Tag Library69
    Declaring a Custom Tag Library69
    Using Actions from a Tag Library73
    8.Processing Input and Output80
    Reading Request Parameter Values80
    Validating User Input92
    Formatting HTML Output104
    9.Error Handling and Debugging106
    Dealing with Syntax Errors106
    Debugging a JSP Application114
    Dealing with Runtime Errors119
    10.Sharing Data Between JSP Pages, Requests, and Users126
    Passing Control and Data Between Pages126
    Sharing Session and Application Data134
    Online Shopping143
    Memory Usage Considerations152
    11.Developing Custom Tag Libraries as Tag Files154
    Creating and Using a Tag File154
    Accessing Attribute Values157
    Processing the Action Body159
    Processing Fragment Attributes162
    Exposing Data to the Calling Page Through Variables165
    Aborting the Page Processing168
    Packaging Tag Files for Easy Reuse168
    12.Accessing a Database171
    Accessing a Database from a JSP Page172
    Validating Complex Input Without a Bean201
    Using Transactions204
    Application-Specific Database Actions206
    13.Authentication and Personalization207
    Container-Provided Authentication208
    Application-Controlled Authentication214
    Other Security Concerns233
    14.Internationalization234
    How Java Supports Internationalization and Localization235
    Generating Localized Output239
    A Brief History of Bits256
    Handling Localized Input259
    15.Working with XML Data268
    Generating an XML Response268
    Transforming XML into HTML270
    Transforming XML into a Device-Dependent Format275
    Processing XML Data277
    16.Using Scripting Elements290
    Using page Directive Scripting Attributes290
    Implicit JSP Scripting Objects291
    Using Scriptlets293
    Using Expressions296
    Using Declarations296
    Mixing Action Elements and Scripting Elements300
    Dealing with Scripting Syntax Errors304
    17.Bits and Pieces313
    Buffering313
    Including Page Segments315
    Global Configuration Options321
    Mixing Client-Side and Server-Side Code326
    Precompiling JSP Pages336
    Preventing Caching of JSP Pages340
    Writing JSP Pages as XML Documents342
    How URIs Are Interpreted348
    Part III.JSP in J2EE and JSP Component Development
    18.Web Application Models353
    The Java 2 Enterprise Edition Model353
    The MVC Design Model356
    Scalability361
    19.Combining JSP and Servlets366
    Servlets, Filters, and Listeners366
    Picking the Right Component Type for Each Task378
    Initializing Shared Resources Using a Listener380
    Access Control Using a Filter383
    Centralized Request Processing Using a Servlet387
    Using a Common JSP Error Page401
    20.Developing JavaBeans Components for JSP403
    Beans as JSP Components403
    JSP Bean Examples409
    Unexpected [left angle bracket]jsp:setProperty[right angle bracket] Behavior419
    21.Developing Custom Tag Libraries Using Java421
    Developing Simple Tag Handlers422
    Developing Classic Tag Handlers442
    Developing Tag Library Functions460
    Creating the Tag Library Descriptor461
    Packaging and Installing a Tag Library469
    22.Advanced Custom Tag Library Features473
    Developing Cooperating Actions473
    Validating Syntax487
    Using a Listener in a Tag Library494
    Dynamic Attribute Values and Types495
    23.Integrating Custom Code with JSTL500
    Setting and Using Configuration Variables500
    Integrating Custom Conditional Actions503
    Integrating Custom Iteration Actions504
    Integrating Custom 118N Actions511
    Integrating Custom Database Actions513
    Using JSTL Tag Library Validators514
    24.Database Access Strategies517
    JDBC Basics517
    Using Connections and Connection Pools520
    Making a Connection Pool Available to Application Components529
    Using a Generic Database Bean536
    Developing Application-Specific Database Components540
    Part IV.Appendixes
    A.JSP Elements Reference547
    B.JSTL Actions and API Reference571
    C.JSP Expression Language Reference622
    D.JSP API Reference628
    E.Book Example Custom Actions and API Reference686
    F.Web Application Structure and Deployment Descriptor Reference700
    Index723

    Available on NOOK devices and apps

    • NOOK eReaders
    • NOOK GlowLight 4 Plus
    • NOOK GlowLight 4e
    • NOOK GlowLight 4
    • NOOK GlowLight Plus 7.8"
    • NOOK GlowLight 3
    • NOOK GlowLight Plus 6"
    • NOOK Tablets
    • NOOK 9" Lenovo Tablet (Arctic Grey and Frost Blue)
    • NOOK 10" HD Lenovo Tablet
    • NOOK Tablet 7" & 10.1"
    • NOOK by Samsung Galaxy Tab 7.0 [Tab A and Tab 4]
    • NOOK by Samsung [Tab 4 10.1, S2 & E]
    • Free NOOK Reading Apps
    • NOOK for iOS
    • NOOK for Android

    Want a NOOK? Explore Now

    JavaServer Pages (JSP) has built a huge following since the release of JSP 1.0 in 1999, providing Enterprise Java developers with a flexible tool for the development of dynamic web sites and web applications. While new point releases over the years, along with the introduction of the JSP Standard Tag Library (JSTL), have incrementally improved the rough areas of the first version of the JSP specification, JSP 2.0 takes this technology to new heights.JavaServer Pages, Third Edition, is completely revised and updated to cover the JSP 2.0 and JSTL 1.1 specifications. It includes detailed coverage of the Expression Language (EL) incorporated into JSP 2.0, the JSTL 1.1 tag libraries and the new function library, the new tag file format that enables custom tag library development without Java code, the simplified Java tag library API, improvements in the JSP XML syntax, and more. Further, it details setup of the Apache Tomcat server, JSP and JSTL syntax and features, error handling and debugging, authentication and personalization, database access, XML processing, and internationalization.This book recognizes the different needs of the two groups of professionals who want to learn JSP: page authors interested in using JSP elements in web pages, and programmers concerned with learning the JSP API and using JSP effectively as a part of an enterprise application. If you're in the first group, you'll learn from the practical web application examples in the second part of the book. If you're in the latter group, you'll appreciate the detailed coverage of advanced topics in the third part, such as how to integrate servlets and JavaBeans components with JSP using the popular Apache Struts MVC framework, and how to develop custom tag libraries using the JSP API, with realistic examples that you can use as a springboard for your own libraries."Hans Bergsten, a JSP expert group veteran and one of our most active contributors, has thoroughly and accurately captured the new features of JSP 2.0 and JSTL 1.1 in a way that is well-organized and easy to understand. With excellent, to-the-point examples, this book is a 'must have' for any serious JSP 2.0 developer."--Mark Roth, JSP 2.0 Specification Lead, Sun Microsystems, Inc.Hans Bergsten is the founder of Gefion Software, a company focused on Java services and products based on J2EE technologies. Hans has been an active participant in the working groups for both the servlet and JSP specifications since their inception and contributes to other related JCP specifications, such as JSP Standard Tag Library (JSTL) and JavaServer Faces (JSF), and, as one of the initial members of the Apache Jakarta Project Management Committee, helped develop the Apache Tomcat reference implementation for the servlet and JSP specifications.

    Read More

    Customers Who Bought This Item Also Bought

    Recently Viewed 

    bn.com
    The Barnes & Noble Review
    This is JSP 2.0 for the real world: all the JSP you’re likely to need.

    Hans Bergsten introduces each JSP feature carefully and accurately: everything from retrieving user input to accessing JavaBeans components. You’ll learn good JSP practices (for instance, how to promote reusability). And you’ll find plenty of examples: database integration, authentication, personalization, caching, you name it.

    Many examples -- such as XML processing -- use JSTL. Often, these replace custom components presented in earlier editions. That’s no coincidence: Bergsten’s examples helped shape the standard.

    Since not everything’s in JSTL, Bergsten explains custom component development. He wraps up with integrating JSP and other Java technologies, notably Struts. Bill Camarda

    Bill Camarda is a consultant, writer, and web/multimedia content developer. His 15 books include Special Edition Using Word 2003 and Upgrading & Fixing Networks for Dummies, Second Edition.

    Sign In Create an Account
    Search Engine Error - Endeca File Not Found