
Résumé
The natural follow up for previous readers of Special Edition Using Java 2 who want in depth coverage of JSP & Servlets.
Contents
Introduction
- Who Should Buy This Book
- How This Book Is Organized
- Conventions Used in This Book
Part I - Basic Java Server Pages
Chapter 1 - The Evolution of the Web Server
- The Basic Web Server
- CGI: The Common Gateway Interface
- NSAPI, ISAPI, and Other Loadable Modules
- Active Server Pages
- Servlets
- XML and XSL Stylesheets
- Java Server Pages
Chapter 2 - Getting Started with Java Server Pages
- A "Hello World" Java Server Page
- Using the <% %> Tags in a Java Server Page
- Displaying a Value with <%=
- Inserting Comments
- Declaring Methods and Variables with <%!
- Handling Multiple Threads in a JSP
- Troubleshooting
Chapter 3 - Getting Started with Servlets
- A "Hello World" Servlet
- Compiling the Servlet
- Runtime Classpath
- The HelloWorldServlet In-Depth
- The Anatomy of a Servlet
- The service Method
- The init Method
- The destroy Method
- The getServletInfo and getServletConfig Methods
- Sending a Response to the Browser
- The HttpServlet Class
- Choosing Between Java Server Pages and Servlets
- The Advantages and Disadvantages of JSP
- The Advantages and Disadvantages of Servlets
- Troubleshooting
Chapter 4 - Creating HTML Forms
- A Simple HTML Form
- Using the request Object
- Handling Multiple Form Values
- Retrieving Form Variables in a Servlet
- JavaScript and Java Server Pages
- Passing Data to JavaScript
- Different Ways to Do Forms
- A Practical HTML and JSP Combination
- Setting Configuration Parameters
- Locking Output Files
- A JSP Input Form Calling a JSP Form Handler
- Using the Same JSP for the Input Form and Form Handler
- An Example Input Form and Form Handler JSP
- Troubleshooting
Chapter 5 - Saving Data Between Requests
- Storing Data in Hidden Form Variables
- Security Concerns with Hidden Variables
- Storing Data in a session Object
- Using the session Object in a JSP
- Using the session Object in a Servlet
- How Sessions Work
- Forcing a New Session
- Handling Session Termination
- The HttpSessionBindingListener Interface
- Handling Sessions Without Cookies
- Disabling Cookies in Internet Explorer
- Disabling Cookies in Netscape
- Storing Application-Wide Data
- Why Do You Need the application Object?
- Troubleshooting
Chapter 6 - Debugging and Error Handling
- Why Debugging Is Tough
- Using Log Files to Debug an Application
- Using System.out and System.err
- Using the Servlet Logging API
- Logging to a File
- Using Exceptions to Trace Execution
- Using a Debugger
- Debugging a Servlet with Tomcat
- Debugging a Java Server Page with Tomcat
- Error Handling
- Specifying an Error Page for a JSP
- Specifying Error Handlers for Web Server Errors
- Troubleshooting
Chapter 7 - Organizing Your Application
- Including Other Files
- Including Files in a JSP at Runtime
- Passing Parameters to an Included File
- Including Files from a Servlet
- Forwarding to Another Page
- Forwarding to Another Page from a JSP
- Forwarding to Another Page from a Servlet
- Passing Parameters to the Forwarded Page
- Passing Java Objects Between JSPs and Servlets
- Making Your Application More Modular
- A Reusable HTML Table Module
- The Model-View-Controller Paradigm
- How Does Model-View-Controller Help?
- An Example Controller
- An Example View
- Calling Multiple Controllers and Views
- Using an Applet in Your Form
- Troubleshooting
Chapter 8 - More About Saving Data
- Designing the Shopping Cart
- Creating the Data Objects
- Creating the ShoppingCart Class
- Displaying the Contents of the Shopping Cart
- Adding and Removing Items
- Completing the Order
- Storing Data in a Cookie
- Using Cookies in Servlets and Java Server Pages
- Troubleshooting
Chapter 9 - Interacting with JavaBeans
- The <jsp:useBean> Tag
- Adding the Bean to the Page
- Getting Bean Properties
- Setting Bean Properties
- Setting Properties Directly from Parameters
- Initializing a New Bean
- The Type of an Existing Bean
- A Bean-Based Web Application
- Troubleshooting
Chapter 10 - Performance
- Making Java Server Pages and Servlets Thread-Safe
- Buffering Pages to Improve Performance
- Caching Objects to Reduce Setup Time
- Precompiling Java Server Pages
- Simple Java Optimizations
- Use the StringBuffer class
- Parsing Numbers
- Creating Objects
- Troubleshooting
Part II - Core Components In-Depth
Chapter 11 - JSP and Servlet Lifecycles
- Servlet Lifecycle
- Servlet Loading
- Servlet Initialization
- Servlet Execution
- Servlet Cleanup
- Java Server Page Lifecycle
- JSP Compilation
- JSP Loading
- JSP Initialization
- JSP Execution
- JSP Cleanup
- Reloading Other Classes
- Troubleshooting
Chapter 12 - How the Browser Interacts with the Server
- The HTTP Protocol
- Viewing the Request Headers Made by a Browser
- Common Request Headers
- The Accept Header
- The Accept-Language Header
- The Accept-Charset Header
- The User-Agent Header
- Common Response Headers
- The Content-Type Header
- The Content-Length Header
- The Cache-Control Header
- The HTTP POST Command
- GET Versus POST
- HTTPS: Secure HTTP
- Troubleshooting
Chapter 13 - Core Servlet Components
- The ServletRequest Class
- Accessing Request Parameters
- Accessing Request Attributes
- Accessing Protocol-Related Information
- Retrieving Request Data
- Handling Uploaded Files
- Getting Locale Information
- The HttpServletRequest Class
- Getting Header Values
- Getting the HTTP Method
- Accessing the Query String
- Retrieving Cookies
- Getting Session Information
- The ServletContext Class
- Getting the Server Version
- Initialization Parameters
- Saving Application-Wide Objects
- Logging Messages
- Calling Other Servlets and JSPs
- Accessing Application Resources
- The ServletResponse Class
- Setting the Content Type and Length
- Opening an Output Stream
- Setting Locale-Specific Information
- Response Buffering
- The HttpServletResponse Class
- Setting Header Variables
- Redirecting the Browser
- Returning Status
- Encoding URLs
- Sending Cookies
- The ServletInputStream Class
- The ServletOutputStream Class
- The HttpSession Class
- Storing and Retrieving Objects
- Controlling Session Termination
- Getting Session Status
- The Cookie Class
- Creating a New Cookie
- Setting the Domain and Path
- Cookie Aging
- Secure Cookies
- Cookie Protocol Versions
- Cookie Comments
- Troubleshooting
Chapter 14 - Core Java Server Page Components
- The Built-In JSP Objects
- The request Object
- The response Object
- The out Object
- The session Object
- The application Object
- The pageContext Object
- The config Object
- The page Object
- The exception Object
- The JspWriter Class
- Sending Output Data
- Buffer Control
- Using a PrintWriter
- The PageContext Class
- Accessing the Built-In Objects
- Accessing Attributes from the PageContext Class
- Forwarding and Including
- The JspEngineInfo Class
- Troubleshooting
Chapter 15 - JSP Directives
- The page Directive
- The language Option
- The import Option
- The session Option
- The buffer and autoFlush Options
- The isThreadSafe Option
- The errorPage Option
- The isErrorPage Option
- The contentType Option
- The info Option
- The extends Option
- The include Directive
- The taglib Directive
- Troubleshooting
Part III - Java Web Application Architecture
Chapter 16 - Introduction to Application Architecture
- The Three Layers of an Application
- Application Tiers
- Applications Come Unglued Over Time
- Physical Versus Logical Tiers
- How Can You Have Half a Tier?
- What I Mean by "Tier"
- Single-Tiered Applications
- Two-Tiered Applications
- Three-Tiered Applications
- The Trade-Offs
- Application Complexity
- Maintainability
- Schedule Pressure
- Development Team Skill
- Miscellaneous Factors
- Hybrid Architectures
Chapter 17 - Browser-Server Interaction
- Designing Your Web Screens
- Redrawing the Entire Page
- Organizing the Presentation into Frames
- Sending Data to a Hidden Frame
- Sending Data to the Browser
- Handling Multiple Calls
- Troubleshooting
Chapter 18 - A Single-Tiered Web Application
- Storing and Retrieving Data
- Locking a File
- Storing Data in a Text File
- Storing Data with Object Serialization
- Storing Data in a Random Access File
- Troubleshooting
Chapter 19 - Building a Two-Tiered Web Application
- Creating a Connection Pool
- Mapping Objects to Database Tables
- A Poor-Man's Object-to-Relational Mapping
- An Example Data Object
- A Two-Tiered Problem Reporting System
- The Login Screen
- The Main Menu
- Querying for Existing Problem Reports
- Creating and Updating Problem Reports
- Database Locking
- Building a Better Connection Pool
- Troubleshooting
Chapter 20 - Designing a Three-Tiered Application
- Stubs and Skeletons
- Single-Client Versus Multi-Client Objects
- Scalability
- Maintainability
- Striking a Balance
- Optimizing Data Access
- Database Locking
- Three-Tiered Application with Enterprise JavaBeans
Chapter 21 - Using RMI in a Web Application
- Using a Single RMI Object for All Requests
- Using One Object Per Browser Session
- An Example RMI Application
- The Database Interface
- The Remote Interfaces
- Implementing the ServiceRequests Interface
- Implementing the RemoteServiceRequest Interface
- Creating the Web Interface
- Editing Service Requests
- Troubleshooting
Chapter 22 - Using CORBA in a Web Application
- Using One CORBA Object for All Sessions
- Using Separate CORBA Objects for Each Session
- Using CORBA Structs
- Dealing with Null Strings
- Alternatives to Null
- An Example CORBA Application
- Troubleshooting
Chapter 23 - Using Enterprise JavaBeans in a Web Application
- What Is Enterprise JavaBeans?
- Entity and Session Beans
- Containers
- Persistence
- Transactions
- Connection Pooling
- Object Pooling
- How EJB, Servlets, and Java Server Pages Fit Together
- Creating an Entity Bean
- Creating the Entity Bean Implementation
- Creating the Home Interface
- Creating the Remote Interface
- Creating a Session Bean
- Creating a Stateless Session Bean
- Accessing EJBs from Java Server Pages
- Packaging a Complete EJB and JSP Application
- Troubleshooting
Part IV - Taking JSP and Servlets Beyond HTML
Chapter 24 - Creating an XML Application
- A "Hello World" XML Page
- Sending XML from a Java Server Page
- Sending XML from a Servlet
- A Few Simple Rules for XML
- Why Use XML with JSP and Servlets?
- Automatically Generated XML
- Parsing XML with SAX and DOM
- Troubleshooting
Chapter 25 - Adding XSL Stylesheets to Enhance an XML Application
- What Is XSL?
- A Simple XSL Stylesheet
- Navigating an XML Document with XPath
- Applying XSL Templates on the Browser
- Applying XSL Templates from a Servlet
- JSP or Stylesheets?
- Troubleshooting
Chapter 26 - Creating a Wireless Web Application
- A Wireless "Hello World" Page
- Viewing the Wireless Hello Page
- A Brief Introduction to WML
- Navigating Between Cards
- Creating Input Forms
- Processing Form Input
- Detecting Wireless Clients in a JSP or Servlet
- A Wireless Score Entry and Reporting System
- Deploying the Scores Application
- Troubleshooting
Chapter 27 - Creating On-the-Fly Graphics
- Images Aren't Just Static Files
- Sending Images from a Servlet
- Uploading Images to a Servlet from Java
- Uploading Images to a Servlet from a Browser
- Performing Online Image Processing
- Adding Captions to Images
- Embossing Images
- Edge Detection
- Lighting Effects
- Troubleshooting
Part V - Advanced Techniques
Chapter 28 - Packaging a JSP Application
- A Simple WAR File Example
- Installing a WAR File Under Tomcat
- Installing a WAR File Under JRun
- WAR Configuration Options
- General Application Options
- Servlet Options
- Others
- Troubleshooting
Chapter 29 - Extending JSP with New Tags
- A "Hello World" Tag
- Packaging and Installing a Tag
- Conditional Includes Using Custom Tags
- Accessing Tag Attributes
- Processing Body Content with a Custom Tag
- Adding Scripting Variables
- Troubleshooting
Chapter 30 - Internationalization
- Detecting the Browser's Preferred Locale
- Using Locale-Based Text Formatters
- Creating a Locale Object
- Formatting Dates
- Formatting Currency
- Getting a Locale for a Browser's Preferred Language
- Using Resource Bundles in Web Pages
- Troubleshooting
Chapter 31 - Security
- Role-Based Security
- Basic Authentication
- The <security-constraint> Tag
- The <login-config> Tag
- Creating a Custom Login Form
- Checking Security Roles Programmatically
- Using Client Certificates for Authentication
- Troubleshooting
Chapter 32 - XML Syntax for JSP
- The XML JSP Syntax
- The HelloWorld JSP in XML
- Translating XML JSP Syntax
- Troubleshooting
Appendix A - JSP Syntax and API Reference
- JSP Syntax
- Code Scriptlets
- Expressions
- Declarations
- Comments
- Directives
- Built-In Objects
- Actions
- XML Syntax
- Root Document
- Code Scriptlets
- Expressions
- Declarations
- Directives
- Tag Libraries
- Java Server Pages API
- javax.servlet.jsp
- javax.servlet.jsp.tagext
Appendix B - Servlet API Reference
- The javax.servlet API
- Interfaces
- Classes
- Exception
- The javax.servlet.http API
- Interfaces
- Classes
Appendix C - Apache and Tomcat
- Where to Get Tomcat
- Installing Tomcat
- Installing Tomcat on Windows
- Installing Tomcat on Linux or UNIX
- Running Tomcat Standalone
- Running Tomcat Under Netscape Server for Windows
- Running Tomcat Under IIS
- Running Tomcat Under Apache
- Running Tomcat with Apache for Windows
- Running Tomcat with Apache for Linux
- Tomcat Configuration
- Working Directory
- Logging
- Setting the Classpath
- Authentication
- Special Tomcat Features
- WAR File Installation
- JSP Compiler
Appendix D - JRun
- Where to Find JRun
- Installing JRun for Windows
- Installing JRun for Linux
- Starting JRun
- JRun Administration
- Connecting JRun to Other Web Servers
- Connecting JRun to IIS or PWS
- Connecting JRun to Netscape Web Server
- Connecting JRun to Apache
- Using JRun as a Standalone Web Server
- Working Directory
- Installing Web Applications
- Setting the Classpath
- Log Files
- JRun Special Features
Appendix E - ServletExec
- Where to Get ServletExec
- Installing the ServletExec ISAPI Plug-In
- Installing the ServletExec NSAPI Plug-In
- Installing the ServletExec Standalone Server for Windows
- Installing the ServletExec Standalone Server for Linux/UNIX
- ServletExec Administration
- Working Directory
- Installing Web Applications
- Log Messages
- Setting the Classpath
- ServletExec Special Features
Appendix F - Resin
- Where to Get Resin
- Installing Resin on Windows
- Unpacking Resin with WinZip
- Unpacking Resin from the Command Line
- Testing the Installation
- Installing Resin on Linux/UNIX
- Running Resin Standalone
- Running Resin Under Another Web Server
- Running httpd or srun as Windows NT Services
- Resin Administration
- Working Directory
- Installing Web Applications
- Logging
- Setting the Classpath
- Adding Authentication Users
- Resin Special Features
- JavaScript Java Server Pages
- XSL
Index
Caractéristiques techniques
PAPIER | |
Éditeur(s) | Que |
Auteur(s) | Mark Wutka |
Parution | 01/10/2000 |
Nb. de pages | 754 |
Format | 18,7 x 23 |
Couverture | Broché |
Poids | 1233g |
Intérieur | Noir et Blanc |
EAN13 | 9780789724410 |
Avantages Eyrolles.com
Consultez aussi
- Les meilleures ventes en Graphisme & Photo
- Les meilleures ventes en Informatique
- Les meilleures ventes en Construction
- Les meilleures ventes en Entreprise & Droit
- Les meilleures ventes en Sciences
- Les meilleures ventes en Littérature
- Les meilleures ventes en Arts & Loisirs
- Les meilleures ventes en Vie pratique
- Les meilleures ventes en Voyage et Tourisme
- Les meilleures ventes en BD et Jeunesse
- Informatique Développement d'applications Conception et développement web Serveurs web et serveurs d'application
- Informatique Développement d'applications Conception et développement web Serveurs web et serveurs d'application Tomcat
- Informatique Développement d'applications Conception et développement web Serveurs web et serveurs d'application JBoss
- Informatique Développement d'applications Langages Java - J2EE JavaServer Pages (JSP)
- Informatique Développement d'applications Langages Java - J2EE Servlets