Previous Table of Contents Next


Java

The Java cartridge is intended to run Java classes on the server. These Java classes can return HTML to the browser with embedded Java applets to run on the client.

The primary purpose of the Java cartridge is to maintain a Java Virtual Machine instance, receive incoming requests for Java classes, and identify, validate, load, and invoke the main() method of whatever Java class is requested. Just as PL/SQL procedures can create HTML dynamically, so too can Java server-side components create HTML files with the results of queries to the database merged in with the HTML formatting tags. The WAS sends these HTML files back to the browser, resulting in the display of information from the database in the browser.

Oracle provides a number of Java classes to support development with the Java cartridge.

The oracle.html package of classes is shown in Table 27.5. It’s similar to the PL/SQL HTP and HTF packages described earlier—the oracle.html package is used to generated HTML tags. If you have any familiarity with HTML, you can get an idea of what many of them probably do just from their names.

Table 27.5. Java classes from the oracle.html package.

Anchor Applet BlockQuote
CheckBox Color Comment
CompoundItem Container DefinitionList
DirectoryList DynamicTable Embed
Form Frame Frameset
Hidden HtmlBody HtmlException
HtmlFile HtmlHead HtmlPage
HtmlRuntimeException HtmlStream IHAlign
IHtmlItem IHtmlItemImpl ITableFrame
ITableRules ITarget IValign
Image ImageMap ImageMapArea
Item Link List
MenuList MetaInfo Option
OrderedList PasswordField Preformat
Radio Reset Select
SimpleItem Submit Table
TableCell TableDataCell TableHeaderCell
TableRow TableRowCell TextArea
TextField unOrderedList XObject

Oracle provides other Java classes in addition to the oracle.html to help Web-enable Java applications. These are listed in Table 27.6.

Table 27.6. Other oracle-provided java packages for user with was.

Package Explanation

oracle.lang Functions to map Unicode and NLS character sets
oracle.owas.wrb Access to various WRB services
oracle.owas.wrb.nls Allows converting between NLS, Unicode, ISO, or IANA standard names and encodings
oracle.owas.wrb.services.http Access to HTTP
oracle.owas.wrb.services.logger Access to the WRB logging service
oracle.plsql Classes that deal with PL/SQL datatype issues
oracle.rdbms Implements a session to an Oracle database

At the time of this writing, Oracle Corporation has announced some major initiatives to increase its support of Java. Watch for the use of Java, in both WAS and throughout the Oracle product, to become as significant as the use of PL/SQL, if not more so.


Previous Table of Contents Next
Используются технологии uCoz