CHAPTER 1 General Overview 1.1 Introduction to JavaServer Pages 1.1.1 What a JSP Page Looks Like 1.1.2 Convenience of JSP Coding versus Servlet COding 1.1.3 Separation of Business Logic from Pgae Presentation-Calling JavaBeans 1.1.4 JSP Pages and Alternative markup Languages 1.2 JSP Execution 1.2.1 JSP Containers in a Nutshell 1.2.2 JP Pages and On-Demand Translation 1.2.3 Requesting a JSP Page 1.3 Overview of JSP Synatx Elements 1.3.1 Directives 1.3.2 scripting Elements 1.3.3 JSP Objects and Scopes 1.3.4 JSP Actions and the <jps:>Tag Set 1.3.5 Tag Libraries CHAPTER 2 Overview of Oracle抯 JSP Implemenation 2.1 Portability and Functionality Across Servlet Environments 2.1.1 OracleJSP Portability 2.1.2 OracleJSP Extended Functionality fOr Servlet 2.0 Environments 2.2 Support for OracleJSP in Oracle Environments 2.2.1 Overview of the Oracle Servlet Engine (OSE) 2.2.2 Overview of the Oracle Intemet Application Server 2.2.3 Role of the Oracle HTTP Server, Powered by Apache 2.2.4 Oracle Web Application Database Access Strategies 2.2.5 Overview of Other Oracle JSP Environrnents 2.3 Support fOr OracleJSP in Non-Oracle Environments 2.4 Overview of OracleJSP Progranunatic Extensions 2.4.1 Overview of Portable OracleJSP Extensions 2.4.2 Overview of Oracle-Specific Extensions 2.4.3 Use of OracleJSP with Oracle PL/SQL Server Pages 2.5 Sununary of OracleJSP Releases and Feature Sets 2.5.1 OracleJSP Releases Provided with Oracle Platforms 2.5.2 OracleJSP Feature Notes for Release 1.0.0.6.x 2.6 OracleJSP Execution Models 2.6.1 On-Demand Translation Model 2.6.2 Oracle Servlet Engine Pre-Translation Model 2.7 Oracle JDeveloper Support for OracleJSP CHAPTER a Basics 3.1 Preliminary Considerations 3.1.1 Installation and Configuration Overview 3.1.2 Development Environments Versus Deployment Environments 3.1.3 Client-Side Considerations 3.2 Application Root and Doc Root Functionality 3.2.1 Application Roots in Servlet 2.2 Environments 3.2.2 OracleJSP Application Root Functionality in Servlet 2.0 Environments 3.3 Overview of JSP Applications and Sessions 3.3.1 General OracleJSP Application and Session Support 3.3.2 JSP Default Session Requests 3.4 JSP-Servlet Interaction 3.4.1 Invoking a Servlet from a JSP Page 3.4.2 Passing Data to a Servlet Invoked from a JSP Page 3.4.3 Invoking a JSP Page from a Servlet 3.4.4 Passing Data BetWeen a JSP Page and a Servlet 3.4.5 JSP-Servlet Interaction SamPles 3.5 JSP Resource Management 3.5.1 Standard Session Resource Management--HttPSessionBindingLi 3.5.2 Overview of Oracle Extensions for Resource Management 3.6 JSP Runtime Error Processing 3.6.1 Using JSP Error Pages 3.6.2 JSP Error Page Example 3.7 JSP Starter SamPle for Database Access CHAPTER 4 Key Consideration 4.1 General JSP Prograxnmng Strategies, Tips, and TraPs 4.1.1 JavaBeans Versus Scriptlets 4.1.2 Use of Enterprise JavaBeans in JSP Pages 4.1.3 Use of JDBC Performance Enhancement FeatUres 4.1.4 Static Includes Versus Dguamic Includes 4.1.5 When to Consider Creating and Using JSP Tag Libraries 4.1.6 Use of a Central Checker Page 4.1.7 Workarounds for Large Static Content in JSP Pages 4.1.8 Method Variable Declarations Versus Member Variable Declarations 4.1.9 Page Directive Characteristics 4.1.10 JSP Preservation of White Space and Use with Binary Data 4.2 Key OracleJSP Configuration Issues 4.2.1 Optimization of JSP Execution 4.2.2 Classpath and Class Loader Issues (Non-OSE Only) 4.3 OracleJSP Runtime Considerations (Non-OSE Only) 4.3.1 Dynamic Page Rchnslation 4-3.2 Dguamic Page Reloading 4.3.3 Dynamic Class Reloading 4.4 Considerations for the Oracle Servlet Engine 4.4.1 Introduction to the JServer JVM and JDBC Server-Side Internal Driver 4.4.2 JServer Connections 4.4.3 Use of JNDI by the Oracle Servlet Engine 4.4.4 Equivalent Code for OracleJSP Runtime ConfigUration Parameters 4.5 Considerations for Apache/JServ Servlet Environments 4.5.1 Use of Apache/JServ in the Oracle Internet Application Server 4.5.2 Dynamic Includes and Forwards in APache/JServ 4.5.3 Application Framework for Apache/JServ 4.5.4 JSP and Servlet Session Sharing 4.5.5 Directory Alias Translation CHAPTER 5 OracleJSP Extensions 5.1 Portable OracleJSP Programming Extensions 5.1.1 JML Extended Datatypes 5.1.2 OracleJSP Support for XML and XSL 5.1.3 Oracle Database-Access JavaBeans 5.1.4 OracleJSP Tag Library for SQL 5.2 Oracle-Specific Programming Extensions 5.2.1 OracleJSP Event Handling--JspScopeListener 5.5.2 OracleJSP SuPport for Oracle SQLJ 5.3 OracleJSP Application and Session Support for Servlet 2.0 5.3.1 Overview of globalsjsa Functionality 5.3.2 Overview ofglobalsJsa Syntax and Semantics 5.3.3 The globalsjsa Event Handlers 5.3.4 Global Declarations and Directives CHAPTER 6 JSP Translation and Deployment 6.1 Functionality of the OracleJSP Translator 6.1.1 Generated Code FeatUres 6.1.2 Generated Package and Class Names (On-Demand Translation) 6.1.3 Generated Files and Locations (On-Demand Translation) 6.1.4 SamPle Page ImPlementation Class Source 6.2 Overview of Features and Logistics in Deployment to Oracle8 i 6.2.1 Database Schema Objects for Java 6.2.2 Oracle HTTP Server as a Front-End Web Server 6.2.3 URLs for the Oracle Servlet Engine 6.2.4 Static Files for JSP Applications in the Oracle Servlet Engine 6.2.5 Server-Side Versus Client-Side Translation 6.2.6 Overview of Hotloaded Classes in Oracle8 i 6.3 Tools and Commands for Translation and Deployment to Oracle8 i 6.3.1 The ojspc Pre-Translation Tool 6.3.2 Overview of the load java Tool 6.3.3 Overview of the sess sh Session Shell Tool 6.4 Deployment to Oracle8 i with Server-Side Translation 6.4.1 Loading Untranslated JSP Pages into Oracle8 i (loadjava) 6.4.2 Translating and Publishing JSP Pages in Oracle8 i (Session Shell publish jsp) 6.5 Deployment to Oracle8 i with Client-Side Translation 6.5.1 Pre-Translating JSP Pages (ojspc) 6.5.2 Loading Translated JSP Pages into Oracle8 i (loadjava) 6.5.3 Hotloading Page lmPlementation Classes in Oracle8 i 6.5.4 Publishing Translated JSP Pages in Oracle8 i (Session Shell publishservlet) 6.6 Additional JSP Deployment Considerations 6.6.1 Doc Root for Oracle Internet Application Server Versus Oracle Servlet En 6.6.1 Use of ojspc for Pre-Translation for Non-OSE Environments 6.6.2 General JSP Pre-Translation Without Execution 6.6.3 Deployment of Binary Files Only 6.6.4 WAR Deployment 6.6.5 Deployment of JSP Pages with JDeveloper CHAPTER 7 JSP Tag Libraries and the Oracle JML Tags 7.1 Standard Tag Library Framework 7.1.1 Overview of a Custom Tag Library ImP1ementation 7.1.2 Tag Handlers 7.1.3 Scripting Variables and Tag-Extra-Info Classes 7.1.4 Access to Outer Tag Handler Instances 7.1.5 Tag Library Description Files 7.1.6 Use of web.xml for Tag Libraries 7.1.7 The taglib Directive 7.1.8 End-to-End ExamPle: Defining and Using a Custom Tag 7.2 Overview of the JSP MarkuP Language (JML) Sample Tag Library 7.2.1 JML Tag Library Philosophy 7.2.2 JML Tag Categories - 7.2.3 JML Tag Library Description File and taglib Directive 7.3 JSP Markup Language (JML) Tag Descriptions 7.3.1 Syntax Symbology and Notes 7.3.2 Bean Binding Tag Descriptions 7.3.3 Logic and Flow Control Tag Descriptions CHAPTER 8 OracleJSP NLS Support 8.1 Content TyPe Settings in the page Directive 8.2 Dynamic Content Type Settings 8.3 OracleJSP Extended Support for Multibyte Parameter Encoding 8.3.1 Effect oftranslate--Params in Ovetriding Non-Multibyte Servlet Containers 8.3.2 Code Equivalent to the translateinarams Configuration Parameter 8.3.3 NLS SamPle Depending on translate--Params 8.3.4 NLS Sample Not Depending on translateParams CHAPTER 9 Sbample Applications 9.1 Basic Samples 9.1.1 Hello Page--hellouserjsp 9.1.2 Usebean Page--usebeanjsp 9.1.3 Shopping Cart Pagecartjsp 9.2 JDBC SamPles 9.2.1 Simple Query--SimPleQueryjsp 9.2.2 User-Specified Query--JDBCQueryjsp 9.2.3 Query Using a Query Bean--UseHtmlQueryBeanjsp 9.2.4 Connection CachingXonnCache3jsp and ConnCache l jsp 9.3 Database-Access JavaBean Samples 9.3.1 Page Using DBBeanDBBeanDemojsp 9.3.2 Page Using ConnBeanConnBeanDemojsp 9.3.3 Page Using CursorBeanCursorBeanDemojsp 9.4 Custom Tag SamPles 9.4.1 JML Tag SamPle--hellouserJmljsp 9.4.2 Pointers to Additional Custom Tag SamPles 9.5 SamPles for Oracle-Specific Progranuning Extensions 9.5.1 Page Using JspScopeListenerscopejsp 9.5.2 XML Query--XMLQueryjsp 9.5.3 SQLJ Queries--SQLJSelectInto.sqljsp and SQLJIterator.sqljsp 9.6 SamPles Using globalsjsa for Servlet 2.0 Environments 9.6.1 globalsjsa ExamPle for Application Events--lottojsp 9.6.2 globalsjsa ExamPle for Application and Session Events--index1jsp 9.6.3 globalsjsa ExamPle for Global Declarations--index2jsp APPENDlXA General Installation and Configuration A.1 System Requirements A.2 OracleJSP Installation and Web Server ConfigUration A.2.1 Required and Optional Files for OracleJSP A.2.2 ConfigUration of Web Server and Servlet Environment to Run OracleJSl A.3 OracleJSP Configuration A.3.1 OracleJSP ConfigUration Parameters (Non-OSE) A.3.2 OracleJSP Configuration Parameter Settings C 1 APPENDlx B bervlet and JSP Technical Background B.1 Background on Servlets B.1.1 Review of Servlet Technology B.1.2 The Servlet Interface B.1.3 Servlet Containers B.1.4 Servlet Sessions B.1.5 Servlet Contexts B.1.6 Application Lifecycle Management Through Event Listeners B.1.7 Servlet Invocation B.2 Web Application Hierarchy B.3 Standard JSP Interfaces and Methods APPENOlX c Compile-Time JML Tag Support C.1 JML Compi1e-Time Versus Runtime Considerations and Logistics C.1.1 General ComPile-Time Versus Runtime Considerations C.1.2 The taglib Directive for ComPile-Time JML SuPport C.2 JML ComPile-Time/1.0.0.6.x Syntax SuPport C.2.1 fuL Bean References and ExPressions, ComPile-Time ImPlementation C.2.2 Attribute Settings with JML ExPressions C.3 JML Compile-Time/1.0.0.6.x Tag SuPPort C.3.1 JML Tag Summary, 1.0.0.6.x/ComPile-Time Versus 1.1.0.0.0/Runtime C.3.2 Descriptions of Additional JML Tags, ComPile-Time Implementation