Java EE and HTML5 Enterprise Application Development
Java EE and HTML5 Enterprise Application Development
John Brock
Arun Gupta
Geertjan Wielenga
New York Chicago San Francisco
Athens London Madrid Mexico City
Milan New Delhi Singapore Sydney Toronto
Copyright 2014 by McGraw-Hill Education (Publisher). All rights reserved. Printed in the United States of America. Except as permitted under the Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of publisher, with the exception that the program listings may be entered, stored, and executed in a computer system, but they may not be reproduced for publication.
ISBN: 978-0-07-182314-2
MHID: 0-07-182314-X
e-book conversion by Cenveo Publisher Services
Version 1.0
The material in this e-book also appears in the print version of this title: ISBN: 978-0-07-182309-8, MHID: 0-07-182309-3
McGraw-Hill Education e-books are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. To contact a representative, please visit the Contact Us pages at www.mhprofessional.com.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. All other trademarks are the property of their respective owners, and McGraw-Hill Education makes no claim of ownership by the mention of products that contain these marks.
Screen displays of copyrighted Oracle software programs have been reproduced herein with the permission of Oracle Corporation and/or its affiliates.
Information has been obtained by McGraw-Hill Education from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, McGraw-Hill Education, or others, McGraw-Hill Education does not guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from the use of such information.
Oracle Corporation does not make any representations or warranties as to the accuracy, adequacy, or completeness of any information contained in this Work, and is not responsible for any errors or omissions.
TERMS OF USE
This is a copyrighted work and McGraw-Hill Education (McGraw-Hill) and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hills prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms.
THE WORK IS PROVIDED AS IS. McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise.
For my wife Lisa: Thanks for encouraging me to take on this project, and putting up with all the long nights and mood swings that came with it.
John
To my lovely wife Menka and wonderful boys Aditya and Mihir for their support and encouragement.
Arun
To my wife Hermine! Also to NetBeans users everywherehope you have fun and learn a lot while you work through this book.
Geertjan
About the Authors
John Brock is a Principal Product Manager for Oracle Corporation. John has over 15 years experience working with web application development. While working at Sun Microsystems, he was responsible for identifying emerging Internet technologies and how they could potentially interact with the Java Virtual Machine (JVM). John has worked with development teams from JRuby, Jython, Groovy, JavaFX, and more. His current focus is on HTML5 application development, and he is the product manager for the HTML5, JavaScript, and CSS3 features of NetBeans IDE. John can easily be reached at @peppertech.
Arun Gupta is Director of Developer Advocacy at Red Hat and focuses on building community around JBoss Middleware. As a founding member of the Java EE team at Sun Microsystems, he spread the love for technology all around the world. At Oracle, Arun led a cross-functional team to drive the global launch of the Java EE 7 platform through strategy, planning, and execution of content, marketing campaigns, and programs. Arun has extensive speaking experience, including appearances in 37 countries speaking on myriad topics, and is a JavaOne Rockstar. An author of a best-selling book, an avid runner, a globe trotter, and a Java Champion, he is easily accessible at @arungupta.
Geertjan Wielenga is a Principal Product Manager for Oracle Corporation. Geertjan has worked in the software industry since 1996. While at Sun Microsystems, he worked on the documentation of a range of technologies, primarily in the Java EE and web areas, developed tutorials, and contributed to published books. Geertjan is a passionate advocate of NetBeans as a central solution to tooling requirements for web-based technologies. He also promotes the NetBeans Platform as a stable and versatile solution for large Java desktop applications. He is currently a product manager assigned to the external evangelism of NetBeans IDE.
About the Technical Editor
John Yeary is a Principal Software Engineer on Epiphany CRM Marketing at Infor Global Solutions. John has been a Java evangelist and has been working with Java since 1995. John is a technical blogger with a focus on Java Enterprise Edition technology, NetBeans, and GlassFish. John is currently the President of the Greenville Java Users Group (GreenJUG), and is its founder. He is an instructor, a mentor, and a prolific open source contributor.
John graduated from Maine Maritime Academy with a B.Sc. Marine Engineering with a concentration in mathematics. He is a Merchant Marine officer, and has a number of licenses and certifications. When he is not doing Java and F/OSS projects, he likes to hike, sail, travel, and spend time with his family. John is also the Assistant Cubmaster in the Boy Scouts of America (BSA) Pack 833, Unit Commissioner, and Southbounder District Chairman for Activities and Civic Service in the Blue Ridge Council of the BSA.