Book description
Java for Web with Servlets, JSP and EJB is the one book you need to master Java web programming. It covers all the technologies needed to program web applications in Java using Servlets 2.3, JSP 1.2, EJB 2.0 and client-side programming with JavaScript. These technologies are explained in the context of real-world projects, such as an e-commerce application, a document management program, file upload and programmable file download, and an XML-based online book project.
In addition to excellent content, this book includes licenses to two Java web components from BrainySoftware.com. You receive a full license of the Programmable File Download component for commercial and non-commercial deployment. You are also granted to a license to deploy the author's popular File Upload bean for non-commercial use, which has been licensed by the Fortune 500 company Commerce One and purchased by major corporations such as Saudi Business Machine, Ltd. and Baxter Healthcare Corporation.
Table of contents
- Copyright
- About the Author
- About the Technical Reviewers
- Acknowledgments
- Tell Us What You Think
- Introduction
-
I. Building Java Web Applications
- 1. The Servlet Technology
- 2. Inside Servlets
- 3. Writing Servlet Applications
-
4. Accessing Databases with JDBC
- The java.sql Package
- Four Steps to Getting to the Database
- A Database-Based Login Servlet
- The Single Quote Factor
- Inserting Data into a Table with RegistrationServlet
- Displaying All Records
- Search Page
- An Online SQL Tool
- Should I Keep the Connection Open?
- Transactions
- Connection Pooling
- Summary
- 5. Session Management
- 6. Application and Session Events
- 7. Servlet Filtering
- 8. JSP Basics
- 9. JSP Syntax
- 10. Developing JSP Beans
-
11. Using JSP Custom Tags
- Writing Your First Custom Tag
- The Role of the Deployment Descriptor
- The Tag Library Descriptor
- The Custom Tag Syntax
- The JSP Custom Tag API
- The Life Cycle of a Tag Handler
- Summary
- 12. Programmable File Download
- 13. File Upload
- 14. Security Configuration
- 15. Caching
- 16. Application Deployment
- 17. Architecting Java Web Applications
- 18. Developing E-Commerce Applications
- 19. XML-Based E-Books
-
20. Web-Based Document Management
-
The Docman Project
- System Requirements
- The Database Structure
- The Code
-
The DBBean Bean
- verifyUser(String userName, String password)
- getDataPath()
- getFolderName(String id, String userName, String password)
- getParentId()
- getChildObjects(String parentId, String userName, String password)
- getFilename(String objectId, String userName, String password)
- getCookie(javax.servlet.http.HttpServletRequest request, String cookie)
- hasUploadPermission(String id, String userName, String password)
- synchronized public int getLastObjectId()
- insertObject(String parentId, String objectId, String filename)
- insertPermissions(String parentId, String objectId)
- The Pages
- File Upload
- Folder Tree
- Further Enhancement
- Summary
-
The Docman Project
-
II. Client-Side Programming with JavaScript
-
21. JavaScript Basics
-
Introduction to JavaScript
- Case-Sensitivity
- Terminating a Line of Code
- Comments
- Strings
- Typedness
- Variable Declarations
- The if Statements
- The while Loop
- The for loop
- The with keyword
- Boolean Expressions
- Logical and Bitwise Operators
- Functions
- The String Object and the string Data Type
- JavaScript Keywords
- Reserved Words
- Illegal Identifiers
- Adding JavaScript Code to HTML
- JavaScript Object Model
- Event Handler
- Window and String Objects
- Summary
-
Introduction to JavaScript
-
22. Client-Side Programming Basics
- Checking Whether JavaScript Is Enabled
- Handling JavaScript-Unaware Browsers
- Handling Different Versions of JavaScript
- Including a JavaScript File
- Checking the Operating System
- Checking the Browser Generation
- Checking the Browser Type
- Checking the Browser Language
- Handling Dynamic Variable-Names
- Summary
- 23. Redirection
-
24. Client-Side Input Validation
- The isEmpty Function
- The trim Function
- The trimAll Function
- The isPositiveInteger Function
- The isValidPhoneNumber Function
- The isMoney Function
- The isUSDate and isOZDate Functions
- Converting Date Formats
- Data Type Conversion: String to Numeric
- Data Type Conversion: Numeric to String
- Using the Validation Functions
- Summary
-
25. Working with Client-Side Cookies
- Creating Cookies with a <META> Tag
- Creating Cookies with document.cookie
- Creating Cookies with the setCookie Function
- Reading Cookies on the Browser
- Deleting a Cookie on the Browser
- Checking If the Browser Can Accept Cookies Using JavaScript
- Checking If the Browser Accepts Cookies Without JavaScript
- Summary
- 26. Working with Object Trees
-
27. Controlling Applets
- Is Java Enabled?
- Is the Applet Ready?
- Resizing an Applet
- Calling an Applet’s Method
- Getting an Applet’s Property
- Setting an Applet Property
- Using Java Classes Directly
- Applet-to-JavaScript Communication
- Accessing the Document Object Model from an Applet
- Invoking JavaScript Functions from an Applet
- Evaluating a JavaScript Statement from an Applet
- Setting the Applet Parameter
- Applet-to-Applet Communication Through JavaScript
- Direct Applet-to-Applet Communication
- Summary
-
21. JavaScript Basics
-
III. Developing Scalable Applications with EJB
- 28. Enterprise JavaBeans
- 29. The Session Bean
- 30. Entity Beans
-
31. EJB Query Language
-
EJB QL Syntax
- The SELECT Clause
- The FROM Clause
-
The WHERE Clause
- Literal
- Identification Variable
- Path Expression
- Input Parameters
- Conditional Expression Composition
- Operators and Operator Precedence
- Between Expressions
- In Expressions
- Like Expressions
- Null Comparison Expressions
- Empty Collection Comparison Expressions
- Collection Member Expressions
- Functional Expressions
- EJB QL BNF
- Summary
-
EJB QL Syntax
- 32. Java Message Service
- 33. Message-Driven Beans
-
IV. Appendixes
- A. Tomcat Installation and Configuration
- B. The javax.servlet Package Reference
- C. The javax.servlet.http Package Reference
- D. The javax.servlet.jsp Package Reference
- E. The javax.servlet.jsp.tagext Package Reference
- F. JBoss Installation and Configuration
- G. Related Resources
- H. What’s On the CD-ROM?
Product information
- Title: Java for the Web with Servlets, JSP, and EJB: A Developer’s Guide to J2EE Solutions
- Author(s):
- Release date: April 2002
- Publisher(s): Sams
- ISBN: 9780735711952
You might also like
book
Practical JSF in Java EE 8: Web Applications in Java for the Enterprise
Master the Java EE 8 and JSF (JavaServer Faces) APIs and web framework with this practical, …
book
Beginning EJB in Java EE 8: Building Applications with Enterprise JavaBeans
Build powerful back-end business logic and complex Enterprise JavaBeans (EJB)-based applications using Java EE 8, Eclipse …
book
Java EE 7 Essentials
Get up to speed on the principal technologies in the Java Platform, Enterprise Edition 7, and …
book
Java EE 8 Development with Eclipse
Develop and deploy fully functional applications and microservices utilising Tomcat, Glassfish servers, Cloud and docker in …