Oracle JSP - Developers Guide Release 1.0 |
This chapter describes the system requirements and guides you through the process of installing and configuring Oracle JSP.
These are the following minimum requirements for Oracle JSP:
Operating Systems: | Any platform that Java 1.1 or greater runs on Note: Oracle JSP is pure Java. |
Java: | Java 1.1 or Java 1.2/2.0 Oracle recommends that you use the latest of either versions that is available on your platform. |
Java Compiler: | javac compiler from a Java 1.1 or 1.2 JDK You are required to use the JDK 1.2 javac compiler if you want support for multibyte encoded JSP pages. |
Webservers: | Server must support Java Servlets running version 2.0 or greater. |
Libraries: |
JSWDK 1.0 or greater servlet.jar. Notes:
|
Oracle JSP is implemented as a Java Servlet. It conforms to the Servlet 2.0 API so that it can run in any Servlet 2.0 or greater servlet runner. Oracle JSP emulates the Servlet 2.1 APIs required by the JSP specification for the JSP pages it hosts running in a Servlet 2.0 runner.
Installing Oracle JSP is similar to installing servlets in your server.
Note: If you are setting up your server to support JSPs with embedded SQLJ statements, consider
also providing an extension map for the .sqljsp extension convention described in Chapter 6. You can map multiple
extensions to the Oracle JSP Servlet.
Note: You only need to do the following if you intend to develop or deploy JSPs that generate its response by first generating XML and then tranforming this XML into the final response via an XSL stylesheet. If this isn't applicable you may still want to install the XML engine so the included XMl sample runs.
To do XSL transformation of a JSP page you need the Oracle XML parser. This can be downloaded from http://technet.oracle.com/tech/xml/parser_java2/ Add the libaray xmlparserv2.jar (in the lib directory) to your server's classpath.
Oracle JSP relies on Java Software defined JSP classes to run. Unfortunately, for licensing reasons we cannot include these classes in the ojsp.jar. In addition, Java Software has chosen to distribute these classes together with their servlet classes. This is done, because in theory JSPs can't run in an environment that predates their release. But Oracle JSPs can. It can run in Servlet 2.0 or greater environments. In such environments, you will need to upgrade the server's configuration to include these new classes. To determine if you need an upgrade:
Oracle JSP does not require additional configuring to run. However, it does provide a number of configuration parameters you can set to adjust its behavior. These configuration parameters are controlled by setting their values as servlet initialization parameters on the Oracle JSP Servlet. Consult your server's documentation to determine the mechanism or syntax for doing this.
Note: The following examples depict the syntax used when running in an Apache/JServ 1.0 environment.
These are the common configurations settings for Oracle JSP:
developer_mode: This flag controls the runtime behavior of the Oracle JSP engine. The values are true or false. The default is true. If set to true, the Oracle JSP engine will check whether to retranslate/reload the requested page or application on every request. If set to false, the Oracle JSP engine will only check whether to translate when the initial request for the page or application is received. Oracle recommends that deployment environments set developer_mode to false to maximize performance. For example:
servlet.oracle.jsp.JspServlet.initArgs=developer_mode=false
translate_params: This flag lets you override servlet engines that don't encode mulitbyte (NLS) request (form) parameters. The values are true or false. The default is false. If set to true, the Oracle JSP engine will encode the request parameters itself. If false, the Oracle JSP engine will return the parameters from the servlet engine unchanged. When developing multibyte JSPs, it is important that you determine if the servlet environment you are running in supports multibyte request parameters or not. Setting translate_params to true in an environment that correctly handles parameter encoding will yield incorrect results. For example:
servlet.oracle.jsp.JspServlet.initArgs=translate_params=true
page_repository_root: By default, the Oracle JSP Servlet uses the web server's document repository to generate or load translated JSPs. The generated .java/.class files are written into a special directory named _pages in the root directory of the application this page is contained in. If the page is not contained in an application that it is written into the _pages subdirectory in the server's docroot directory. If you want the Oracle JSP engine to generate pages to a location outside the server's docroot set the page_repository_root initArg. The value of this argument should be a fully qualified path to the root directory into which pages will be generated or run. This directory does not need to exist. For example:
servlet.oracle.jsp.JspServlet.initArgs=page_repository_root=c:\jsps
classpath: By default, Oracle JSP loads classes from either the system classpath, the page repository, or predefined locations relative to the JSP's application root directory (see Chapter 4). If additional class dependencies exist they can be specified using the classpath initArgs. The form for specifying a classpath follows the conventions that the platform uses for specifying a regular Java classpath. For example:
servlet.oracle.jsp.JspServlet.initArgs=classpath=c:\somedir\myapp.jar
Since this version currently has some class loader issues, Oracle recommends that all dependent classes be included in the regular JServ classpath rather than via the classpath setting.
The following settings are rarely used and tend to be server specific. Often, a supplemental document released with your server will detail if or how to use these settings. Currently none of the following settings are in use.
page_provider_root: By default, Oracle JSP uses the web server's document repository to locate the .jsp file that corresponds to the incoming request. page_provider_root lets Oracle JSP copy these files from an alternative repository or location. This setting is primarily provided to support servers that don't use the file systems as their repository.
page_provider: By default, the JspServlet assumes pages are being delivered from or to a file system. This is not universally true for all Oracle implementations. This setting lets you specify an alternative class to be used as a page provider for the JspServlet. Currently, there are no alternatives implemented.
page_repository: By default, the JspServlet assumes generated pages are being delivered from or to a file system. This is not universally true for all Oracle implementations. This setting lets you specify an alternative class to be used to manage a page repository for Oracle JSP engine. Currently, there are no alternatives implemented.
classloader: By default, the JspServlet assumes classes are being loaded from a file system. This is not universally true for all Oracle implementations. This setting lets you specify an alternative class to be used to implement a classloader for the JspServlet. Currently, there are no alternatives implemented.
jspcompiler: By default, the JspServlet uses the built-in Java compiler (javac). Pages are read directly from the file system. In the future, Oracle plans to support in memory compilation as well as compiling out of different repository types. This setting names the class that implements the JspCompiler interface. Currently, there are no alternatives implemented.
Typically, an existing Oracle JSP installation is easily upgraded. Normally, all you need to do is overwrite the existing ojsp.jar and restart the server. More specifically:
|
|