Oracle8i Application Developer's Guide - XML Release 3 (8.1.7) Part Number A86030-01 |
|
Customizing Discoverer 3i Viewer with XSL, 9 of 9
What is a servlet?
Servlets are modules of Java code that run in a server application (hence the name "Servlets", similar to "Applets" on the client side) to answer client requests. Servlets are not tied to a specific client-server protocol but they are most commonly used with HTTP and the word "Servlet" is often used in the meaning of "HTTP Servlet".
Servlets make use of the Java standard extension classes in the packages javax.servlet (the basic Servlet framework) and javax.servlet.http (extensions of the Servlet framework for Servlets that answer HTTP requests). Since Servlets are written in the highly portable Java language and follow a standard framework, they provide a means to create sophisticated server extensions in a server and operating system independent way.
Typical uses for HTTP Servlets include:
What does Discoverer 3I Viewer use to communicate with the user's browser?
HTTP and HTML.
Why does Discoverer 3i Viewer only output HTML to the user's browser?
Discoverer 3i Viewer outputs 100% HTML so that it can support the widest possible range of browsers. Using this architecture also avoids the need for an end user to perform an install or download.
How is XML used by Discoverer 3I Viewer?
XML is generated by the middle-tier and represents the application state. Discoverer 3iViewer Servlet interprets an HTTP request from the user's browser, and makes the necessary calls to the Discoverer Server.
The server response is represented in XML generated by the Servlet. XSL is applied to this XML, producing the HTML that is displayed by the users browser.
By using XML and XSL together, the underlying data and the look and feel are separated allowing easy customization.
What does the disco3iv.xml file do?
You can use disco3iv.xml file to configure various options to make Discoverer 3i Viewer behave the way you want to. For example, you can specify the Discoverer Session that it should connect to.
XSL
How is XSL used by Discoverer 3i Viewer?
Discoverer 3I Viewer uses XSL (or more specifically XSL-T) to transform the XML generated by the middle-tier into the HTML that is sent to the user's browser. By editing the XSL files, you gain complete control over the style and presentation of the UI.
What XSL processors can be used by Discoverer 3i Viewer?
Discoverer 3i Viewer can be configured to use:
How can you specify which XSL processor Discoverer 3i Viewer uses?
By default Discoverer 3i Viewer uses Oracle XSL-T Processor. If you prefer you can use James Clark's XT. The Servlet can be reconfigured to use the James Clark XSL processor as follows:
The JAR should be included in either the class path of the Servlet engine or the classpath for the Servlet engine zone. Different servlet engines have different ways of doing this.
For example, for Apache JServ the servlet engine's class path is setup in the wrapper.classpath entry of the JServ.properties file. The classpath for the servlet zone is specified as a repository in the servlet zone properties.
For details on how to set up each servlet engine read the section in the Discoverer Installation and Administration Guide on how Visibroker jar files are installed for that servlet engine. The process for installing the XT processor Jar file is identical.
<argument name="xsl_processor">com.jclark.xsl.sax.XSLProcessor</argument>
What tools are available to edit XSL Stylesheets?
You can use any text editor to edit XSL files however the following applications are designed especially for editing XSL:
What is commonly changed in order to customize a stylesheet?
To customize a styelsheet, edit the following items:
When I customize my own XSL Stylesheet, why can't I see my changes?
By default, the XSL-T Processor caches the XSL files in its memory for better performance. You have two options for viewing the changes:
<argument name="xsl_cache">false</argument>
Why does my browser display a blank screen?
This is usually because you have done either of the following:
Where can I find more information on XML and XSL?
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|