J2EE™ and JAX™: Developing Web Applications and Web Services

Book description

Learn J2EE and the JAX APIs for Web services and applications—all in one volume.

  • The first book to offer integrated coverage of J2EE and JAX in one volume

  • Java Web application and services programming taught by example

  • Rich with code examples and explanations of supporting technologies

  • CD-ROM includes free, fully functional copy of HP Application Server (HP-AS)

  • Using a simple, stand-alone program as a point of departure, Java expert Michael Yawn brings you through all the steps and decisions needed to transform it into a rich, Web-enabled application. Along the way you'll gain a working knowledge of Java 2 Enterprise Edition (J2EE) and the Java APIs for XML (JAX)—emerging technologies for writing Web applications and working with XML documents and procedures. Yawn's technique of reworking the example application gives you hands-on experience at adapting software for different purposes and environments, as well as a deep understanding of how to build flexibility into your projects from the outset.

  • Web applications and services-and underlying technologies-by example

  • Layering applications to simplify reworking; using design patterns

  • Integrating JavaServer Pages, JavaBeans, Servlets, and custom tag libraries

  • XML on the Web and with wireless devices

  • Java Message Service, MOM, and XML messaging with SOAP and JAXM

  • JAX RPC services and their clients

  • Enterprise JavaBeans-Session, Message-Driven, and Entity beans

  • CD-ROM contains a full copy of HP Application Server (HP-AS)—a free alternative to IBM's WebSphere and BEA's WebLogic—and code samples from the book

  • In his engaging style, Yawn doesn't simply describe Web applications and services-you'll come away understanding how it all fits together. With the whys well in hand, you'll be a much more effective coder. This book requires only a basic knowledge of Java programming, and its content is applicable to all servers.

    Table of contents

    1. Copyright
    2. List of Acronyms
    3. Preface
    4. Foundations
      1. Introduction
        1. Why This Book Was Written
        2. Who Needs This Book?
        3. What's This Book About?
        4. Why J2EE and Not Java?
        5. Architectural Principles
        6. Organization
        7. Software Used
        8. Using This Book
        9. On the Web
      2. The Example Application
        1. Finding the Objects
        2. The Division and Conference Classes
        3. The Team Class
        4. The Game Class
        5. The Teams and Games Container Classes
        6. The Standings Class
        7. Building and Running the Example Application
        8. Exercises
        9. Further Reading
      3. The Layered Application
        1. A Better Design for Handling Enumerated Types
        2. Using an Object Factory
        3. MVC Architecture
        4. The Team Interface and Implementation
        5. Messaging Facility Interface and Implementation
        6. Continuing the Separation of Interface and Implementation
        7. Separating Persistence from Games and Teams
        8. Separating Presentation from the Standings Class
        9. Separating the User Interface: The Console Class
        10. Building and Running the Layered Application
        11. Exercises
        12. Further Reading
    5. Web Applications
      1. Introduction to Presentation Architecture
        1. Textual Interfaces
        2. Graphical User Interfaces
        3. Web Browser Interfaces
        4. Web Services
        5. XML Validation
        6. Exercises
        7. Further Reading
      2. Servlets
        1. What Is a Servlet?
        2. Using a Servlet for the Standings Class
        3. Messaging Implementation for Servlets
        4. Dynamic Behavior in the Standings Application
        5. Advanced Servlet Topics
        6. Exercises
        7. Further Reading
      3. JavaServer Pages
        1. JSP Scripting Elements
        2. JSP Directives
        3. Building, Installing, and Running the Scriptlet
        4. JSP Actions
        5. Exercises
        6. Further Reading
      4. Integrating JavaServer Pages with JavaBeans and Servlets
        1. Using JavaServer Pages with JavaBeans
        2. Installing and Running the Bean Example
        3. Using Servlets and JSP Together
        4. Custom Tag Libraries
        5. Tag Library API Reference
        6. Exercises
        7. Further Reading
      5. Struts
        1. What Is a Framework, Anyway?
        2. Struts Components
        3. Handling User Preferences
        4. Getting Favorite Team Information from Struts
        5. Building, Installing, and Running the Struts Application
        6. Other Frameworks
        7. Exercises
        8. Further Reading
      6. Web Presentation with XML and XSLT
        1. XML Acronyms FYI: An XML Glossary with References
        2. XML Processors and JAXP
        3. Creating an XML Document with DOM
        4. Creating an XML Document with JDOM
        5. Transforming XML to HTML via XSLT
        6. Building, Installing, and Running the XML Presentation Classes
        7. Exercises
        8. Further Reading
      7. Using XML with Wireless Clients
        1. WML and XHTML Markup Languages
        2. Building, Installing, and Running the Wireless Presentation and Servlet Classes
        3. Presentation Architecture Wrap-Up and Review
        4. Exercises
        5. Further Reading
    6. Distributed Objects and Web Services
      1. Introduction to Distributed Objects and Web Services
        1. Web Services Defined
        2. Web-Service Models
        3. Web-Service Security
      2. The Java Message Service
        1. JMS Features
        2. JMS Pieces and Parts
        3. A JMS-Based Game Server
        4. JMS API Reference
        5. Java Naming and Directory Interface
        6. JNDI API Reference
        7. A JMS Subscriber
        8. Building, Deploying, and Running the JMS Examples
        9. Exercises
        10. Further Reading
      3. XML Messaging: SOAP and JAXM
        1. SOAP
        2. Creating SOAP Messages with JAXM
        3. Consuming the Web Service
        4. JAXM API Docs
        5. Building, Deploying, and Running the Application
        6. Exercises
        7. Further Reading
      4. Parsing and Manipulating XML
        1. Using DOM
        2. DOM API Reference
        3. Using SAX
        4. SAX API Reference
        5. Using JDOM
        6. JDOM API Reference
        7. Building and Running the JaxmClient Example
        8. Using JAXB
        9. Building and Running the JAXB Example
        10. Exercises
        11. Further Reading
      5. Remote Method Invocation (RMI)
        1. Basic RMI Concepts
        2. Creating a Remotely Accessible Standings Object
        3. The RMI Registry
        4. An RMI Client
        5. RMI APIs
        6. A Remote Object Factory
        7. RMI Troubleshooting
        8. Building and Running the RMI Examples
        9. Exercises
        10. Further Reading
      6. Building a Web Service with JAX-RPC
        1. The Basics of JAX-RPC
        2. Publishing a Web Service with JAX-RPC
        3. Creating Stubs and Ties with XRPCC
        4. Consuming a JAX-RPC Web Service
        5. Building, Deploying, and Running the JAX-RPC Examples
        6. Exercises
        7. Further Reading
      7. Describing, Publishing, and Finding Web Services
        1. Describing Web Services with WSDL
        2. Standardized Web Services
        3. Publishing Web Services
        4. Describing Complex Business Relationships
        5. Exercises
        6. Further Reading
      8. Clients for JAX-RPC Web Services
        1. JAX-RPC Clients
        2. JAX-RPC API Documentation
        3. Building and Running the Examples
        4. Exercises
        5. Further Reading
    7. Enterprise JavaBeans
      1. Session Beans
        1. Introduction to Enterprise JavaBeans
        2. Creating a Session Bean for the Standings
        3. Session Bean APIs
        4. Building, Deploying, and Running the Examples
        5. Developing an EJB Client
        6. Exercises
        7. Further Reading
      2. Message-Driven Beans
        1. Writing a Message-Driven Bean
        2. Message-Driven Bean API Reference
        3. Building, Deploying, and Running the Message-Driven Bean Example
        4. Exercises
        5. Further Reading
      3. Entity Beans
        1. Bean-Managed versus Container-Managed Persistence
        2. Writing an Entity Bean
        3. Entity Bean API Reference
        4. Building and Deploying the Entity Bean
        5. Bean Relationships
        6. Finder Methods and the EJB Query Language
        7. Creating the Database
        8. Deploying An Entity Bean in BEA WLS 6.1
        9. Using the Entity Bean
        10. Exercises
        11. Further Reading
      4. A Look Back, A Look Ahead
        1. Where We've Been, What We've Learned
        2. What's Ahead for XML and Web Services
        3. What's Ahead for Enterprise JavaBeans
        4. What's Ahead for This Book
      5. Program Listings for the Original Application
        1. The Conference Class
        2. The Division Class
        3. The Game Class
        4. The Games Class
        5. The Standings Class
        6. The Team Class
        7. The Teams Class
      6. Bibliography
    8. Index

    Product information

    • Title: J2EE™ and JAX™: Developing Web Applications and Web Services
    • Author(s): Michael Yawn
    • Release date: September 2002
    • Publisher(s): Pearson
    • ISBN: 9780130476760