You are previewing Java EE 6 Development with NetBeans 7.
O'Reilly logo
Java EE 6 Development with NetBeans 7

Book Description

Developing Java EE applications is faster and far less demanding when you can use NetBeans. The guide quickly familiarizes you with this popular Integrated Development Environment (IDE) through practical instruction.

  • Use features of the popular NetBeans IDE to accelerate development of Java EE applications

  • Develop JavaServer Pages (JSPs) to display both static and dynamic content in a web browser

  • Covers the latest versions of major Java EE APIs such as JSF 2.0, EJB 3.1, and JPA 2.0, and new additions to Java EE such as CDI and JAX-RS

  • Learn development with the popular PrimeFaces JSF 2.0 component library

  • In Detail

    NetBeans has several features that greatly simplify Java EE development, but with many features and great flexibility, Java developers can become overwhelmed by the options available in NetBeans. This book provides step-by-step recipes that show you how to take control of the environment and make use of these features to make your enterprise Java application development more efficient and productive than ever before, so that you can concentrate on the important parts of your application.

    Java EE 6 Development with NetBeans 7 takes you through the most important parts of Java EE programming and shows you how to use the features of NetBeans that will improve your development experience with clear, careful instructions and screenshots. It will show you how to use NetBeans functionality to automate many of the tedious or repetitive tasks frequently encountered when developing enterprise Java applications, freeing you up to focus on the business logic specific parts of the application. As well as showing you time-saving tricks, keyboard shortcuts, and other productivity enhancements possible with NetBeans, it will take you through the major Java EE APIs and how to get them working in the NetBeans environment.

    While focusing on NetBeans features, you will learn about developing applications using the servlet API and JSPs, including taking advantage of JSTL and developing custom JSP tags. Developing applications that take advantage of JavaServer Faces is also covered in detail, including how to generate standard JSF applications from an existing database schema. The book also covers how to easily develop elegant JSF applications by taking advantage of the PrimeFaces JSF 2.0 component library that is bundled with NetBeans.

    A practical guide covering how to leverage NetBeans 7 functionality to develop enterprise applications compliant with the Java EE 6 standard

    Table of Contents

    1. Java EE 6 Development with NetBeans 7
      1. Java EE 6 Development with NetBeans 7
      2. Credits
      3. About the Author
      4. About the Reviewers
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      6. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      7. 1. Getting Started with NetBeans
        1. Introduction
        2. Obtaining NetBeans
        3. Installing NetBeans
          1. Microsoft Windows
          2. Mac OS X
          3. Linux and Solaris
          4. Other platforms
          5. Installation procedure
        4. Starting NetBeans for the first time
        5. Configuring NetBeans for Java EE development
          1. Integrating NetBeans with a third party application server
          2. Integrating NetBeans with a third party RDBMS
            1. Adding a JDBC driver to NetBeans
            2. Connecting to a third party RDBMS
        6. Deploying our first application
        7. NetBeans tips for effective development
          1. Code completion
          2. Code templates
          3. Keyboard shortcuts
          4. Understanding NetBeans visual cues
        8. Summary
      8. 2. Developing Web Applications with Servlets and JSPs
        1. Creating our first web application
          1. Modifying NetBeans' generated code
            1. Developing the input page
            2. Developing the output page
        2. Servlet development
          1. Adding a Servlet to our Application
        3. Securing web applications
          1. Implementing form-based authentication
            1. Implementing the login page
            2. Implementing a login error page
            3. Configuring our application for form-based authentication
              1. GlassFish Specific Security Configuration
        4. JSP fragments
          1. Creating a JSP fragment in NetBeans
        5. Summary
      9. 3. Enhancing JSP Functionality with JSTL and Custom Tags
        1. Core JSTL tags
          1. Conditionally displaying part of a page with the <c:if> tag
          2. Displaying mutually exclusive markup with the <c:choose> tag
          3. Iterating through arrays or collections with the <c:forEach> tag
        2. SQL JSTL tags
          1. Retrieving database data with the <sql:query> tag
        3. Modifying database data with the <sql:update> tag
          1. Inserting database data
          2. Updating database data
          3. Deleting database data
        4. Closing remarks about JSTL
        5. Custom JSP tags
        6. Summary
      10. 4. Developing Web Applications using JavaServer Faces 2.0
        1. Introduction to JavaServer faces
        2. Developing our first JSF application
          1. Creating a new JSF project
            1. Modifying our page to capture user data
            2. Creating our managed bean
            3. Implementing the confirmation page
            4. Executing our application
            5. JSF validation
        3. Facelets templating
          1. Adding a Facelets template to our project
          2. Using the template
        4. Composite components
        5. Summary
      11. 5. Elegant Web Applications with PrimeFaces
        1. Our first PrimeFaces project
        2. Using PrimeFaces components in our JSF applications
        3. Tabbed views
        4. Wizard interfaces
        5. More information
        6. Summary
      12. 6. Interacting with Databases through the Java Persistence API
        1. Creating our first JPA entity
          1. Adding persistent fields to our entity
          2. Creating a DAO
        2. Automated Generation of JPA Entities
          1. Named Queries and JPQL
          2. Bean Validation
        3. Entity Relationships
        4. Generating JSF applications from JPA entities
        5. Summary
      13. 7. Implementing the Business Tier with Session Beans
        1. Introducing Session Beans
        2. Creating a session bean in NetBeans
        3. Accessing the bean from a client
          1. Executing the client
        4. Session bean transaction management
        5. Implementing aspect oriented programming with interceptors
          1. Implementing the interceptor class
          2. Decorating the EJB with the @Interceptors annotation
        6. EJB timer service
        7. Generating session beans from JPA entities
        8. Summary
      14. 8. Contexts and Dependency Injection (CDI)
        1. Introduction to CDI
        2. Qualifiers
        3. Stereotypes
        4. Interceptor Binding Types
        5. Summary
      15. 9. Messaging with JMS and Message Driven Beans
        1. Introduction to JMS
        2. Creating the project and JMS resources
          1. Creating a JMS destination
          2. Sending messages to a message destination
        3. Processing JMS messages with message driven Beans
        4. Summary
      16. 10. SOAP Web Services with JAX-WS
        1. Introduction to web services
        2. Creating a simple web service
          1. Testing our web service
          2. Developing a client for our web service
        3. Exposing EJBs as web services
          1. Implementing new web services as EJBs
          2. Exposing existing EJBs as web services
          3. Creating a web service from an existing WSDL
        4. Summary
      17. 11. RESTful Web Services with JAX-RS
        1. Generating a RESTful web service from an existing database
          1. Analyzing the generated code
        2. Testing our RESTful web service
        3. Developing a RESTful web service client
        4. Summary
      18. A. Debugging Enterprise Applications with the NetBeans Debugger
        1. Debugging enterprise applications
        2. Summary
      19. B. Identifying Performance Issues with the NetBeans Profiler
        1. Profiling our application
        2. Summary