没有合适的资源?快使用搜索试试~ 我知道了~
Oracle 9i Support for JavaServer Pages Reference Release 2 (9.2)
需积分: 1 0 下载量 162 浏览量
2023-04-07
14:14:48
上传
评论
收藏 1.79MB PDF 举报
温馨提示
试读
248页
Oracle 9i Support for JavaServer Pages Reference Release 2 (9.2)
资源推荐
资源详情
资源评论
Oracle9
i
Support for JavaServer Pages Reference
Release 2 (9.2)
March 2002
Part No. A96657-01
Oracle9i Support for JavaServer Pages Reference, Release 2 (9.2)
Part No. A96657-01
Copyright © 2000, 2002 Oracle Corporation. All rights reserved.
Primary Author: Brian Wright
Contributing Author: Michael Freedman
Contributors: Julie Basu, Alex Yiu, Sunil Kunisetty, Gael Stevens, Ping Guo, YaQing Wang, Song Lin,
Hal Hildebrand, Jasen Minton, Matthieu Devin, Jose Alberto Fernandez, Olga Peschansky, Jerry
Schwarz, Clement Lai, Shinji Yoshida, Kenneth Tang, Robert Pang, Kannan Muthukkaruppan, Ralph
Gordon, Shiva Prasad, Sharon Malek, Jeremy Lizt, Kuassi Mensah, Susan Kraft, Sheryl Maring, Ellen
Barnes, Angie Long, Sanjay Singh, Olaf van der Geest
The Programs (which include both the software and documentation) contain proprietary information of
Oracle Corporation; they are provided under a license agreement containing restrictions on use and
disclosure and are also protected by copyright, patent and other intellectual and industrial property
laws. Reverse engineering, disassembly or decompilation of the Programs, except to the extent required
to obtain interoperability with other independently created software or as specified by law, is prohibited.
The information contained in this document is subject to change without notice. If you find any problems
in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this
document is error-free. Except as may be expressly permitted in your license agreement for these
Programs, no part of these Programs may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without the express written permission of Oracle Corporation.
If the Programs are delivered to the U.S. Government or anyone licensing or using the programs on
behalf of the U.S. Government, the following notice is applicable:
Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercial
computer software" and use, duplication, and disclosure of the Programs, including documentation,
shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement.
Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer
software" and use, duplication, and disclosure of the Programs shall be subject to the restrictions in FAR
52.227-19, Commercial Computer Software - Restricted Rights (June, 1987). Oracle Corporation, 500
Oracle Parkway, Redwood City, CA 94065.
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently
dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup,
redundancy, and other measures to ensure the safe use of such applications if the Programs are used for
such purposes, and Oracle Corporation disclaims liability for any damages caused by such use of the
Programs.
Oracle is a registered trademark, and Oracle9i, PL/SQL, SQL*Plus, and Oracle Store are trademarks or
registered trademarks of Oracle Corporation. Other names may be trademarks of their respective
owners.
iii
Contents
Send Us Your Comments ................................................................................................................... ix
Preface............................................................................................................................................................ xi
Intended Audience ............................................................................................................................... xii
Documentation Accessibility .............................................................................................................. xii
Organization.......................................................................................................................................... xiii
Related Documentation ...................................................................................................................... xiv
Conventions......................................................................................................................................... xviii
1 General Overview
Introduction to JavaServer Pages..................................................................................................... 1-2
What a JSP Page Looks Like........................................................................................................ 1-2
Convenience of JSP Coding Versus Servlet Coding................................................................ 1-3
Separation of Business Logic from Page Presentation: Calling JavaBeans .......................... 1-5
JSP Pages and Alternative Markup Languages........................................................................ 1-5
JSP Execution....................................................................................................................................... 1-7
JSP Containers in a Nutshell ....................................................................................................... 1-7
JSP Pages and On-Demand Translation.................................................................................... 1-7
Requesting a JSP Page.................................................................................................................. 1-8
Overview of JSP Syntax Elements................................................................................................. 1-10
Directives ..................................................................................................................................... 1-10
Scripting Elements...................................................................................................................... 1-12
JSP Objects and Scopes .............................................................................................................. 1-14
JSP Actions and the <jsp: > Tag Set ......................................................................................... 1-18
iv
Tag Libraries................................................................................................................................ 1-23
2 Overview of the Oracle JSP Implementation
Overview of JSP and Servlet Containers and Web Server with Oracle9i................................ 2-2
JSP Container and Servlet Environment Provided with Oracle9i......................................... 2-2
Other Servlet Environments........................................................................................................ 2-3
Role of the Oracle HTTP Server.................................................................................................. 2-3
Portability and Functionality Across Servlet Environments...................................................... 2-5
Oracle JSP Portability ................................................................................................................... 2-5
Oracle JSP Extended Functionality for Servlet 2.0 Environments......................................... 2-5
Oracle9i JDeveloper Support for the Oracle JSP Container....................................................... 2-7
Support for the Oracle JSP Container in Non-Oracle Environments....................................... 2-8
Overview of Oracle JSP Programmatic Extensions...................................................................... 2-9
Overview of Oracle-Specific Extensions.................................................................................... 2-9
Overview of JSP Tag Libraries and JavaBeans Provided with Oracle9i............................. 2-11
JSP Execution Models ...................................................................................................................... 2-14
On-Demand Translation Model ............................................................................................... 2-14
Pre-Translation Model ............................................................................................................... 2-14
3Basics
Application Root and Doc Root Functionality.............................................................................. 3-2
Application Roots in Servlet 2.2 Environments ....................................................................... 3-2
Oracle Implementation of Application Root Functionality in Servlet 2.0 Environments.. 3-3
Overview of JSP Applications and Sessions ................................................................................. 3-4
General Application and Session Support in the Oracle JSP Container............................... 3-4
JSP Default Session Requests ...................................................................................................... 3-4
JSP-Servlet Interaction....................................................................................................................... 3-5
Invoking a Servlet from a JSP Page............................................................................................ 3-5
Passing Data to a Servlet Invoked from a JSP Page................................................................. 3-6
Invoking a JSP Page from a Servlet............................................................................................ 3-6
Passing Data Between a JSP Page and a Servlet....................................................................... 3-8
JSP-Servlet Interaction Samples.................................................................................................. 3-8
JSP Resource Management ............................................................................................................. 3-10
Standard Session Resource Management with HttpSessionBindingListener.................... 3-10
Overview of Oracle Extensions for Resource Management................................................. 3-15
v
JSP Runtime Error Processing........................................................................................................ 3-16
Using JSP Error Pages................................................................................................................ 3-16
JSP Error Page Example............................................................................................................. 3-17
JSP Starter Sample for Data Access............................................................................................... 3-19
4 Key Considerations
General JSP Programming Strategies, Tips, and Traps............................................................... 4-2
JavaBeans Versus Scriptlets......................................................................................................... 4-2
Use of JDBC Performance Enhancement Features .................................................................. 4-3
Static Includes Versus Dynamic Includes................................................................................. 4-6
When to Consider Creating and Using JSP Tag Libraries...................................................... 4-8
Use of a Central Checker Page.................................................................................................... 4-9
Workarounds for Large Static Content in JSP Pages............................................................. 4-10
Method Variable Declarations Versus Member Variable Declarations.............................. 4-11
Page Directive Characteristics .................................................................................................. 4-13
JSP Preservation of White Space and Use with Binary Data................................................ 4-14
Oracle XML Support .................................................................................................................. 4-17
Key JSP Configuration Issues........................................................................................................ 4-19
Optimization of JSP Execution ................................................................................................. 4-19
Classpath and Class Loader Issues .......................................................................................... 4-20
Oracle JSP Runtime Page and Class Reloading.......................................................................... 4-24
Dynamic Page Retranslation..................................................................................................... 4-24
Dynamic Page Reloading .......................................................................................................... 4-25
Dynamic Class Reloading ......................................................................................................... 4-25
5 Oracle-Specific Programming Extensions
Oracle JSP Event Handling with JspScopeListener..................................................................... 5-2
Oracle JSP Support for Oracle SQLJ............................................................................................... 5-3
SQLJ JSP Code Example .............................................................................................................. 5-3
Triggering the SQLJ Translator .................................................................................................. 5-5
Setting Oracle SQLJ Options....................................................................................................... 5-6
6 JSP Translation and Deployment
Functionality of the Oracle JSP Translator .................................................................................... 6-2
剩余247页未读,继续阅读
资源评论
rocazj
- 粉丝: 9
- 资源: 726
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功