Oracle JSP Demo ReadMe

This zip file includes JavaServer Pages demos including Oracle extensions and JSP Standard Taglib Libraries.

Prerequisites

You will need either an iAS installation or the standalone version of Oracle Containers For Java installed on your machine. Additionally, the following environment variables should be set. They are normally set for you in iAS, but for Standalone you should set them as follows:
ORACLE_HOMEThe directory into which you unzipped the oc4j_extended.zip
JAVA_HOMEThe root of your Java Development Kit
J2EE_HOME<ORACLE_HOME>/j2ee/home

Deploying

Put the jsp_demos.zip file in any convient location, unzip it. Then deploy the ear file from the dist directory into an iAS or a standalone Oracle Containers For Java installation

Standalone OC4J instance

- Make sure your standalone instance is installed and running, for example 

   >   java -jar $J2EE_HOME/oc4j.jar -config $J2EE_HOME/config/server.xml &
   >   java -jar $J2EE_HOME/oc4j.jar -config $J2EE_HOME/config/server.xml -install

- Deploy the application 

   >  java -jar $J2EE_HOME/admin.jar ormi://localhost  ; 
   >      -deploy 
   >      -file ./dist/ojspdemos.ear 
   >      -deploymentName ojspdemos

- Bind the OJSP war file to some web site, for example, http-web-site

   > java -jar $J2EE_HOME/admin.jar ormi://localhost   
   >       -bindWebApp  ojspdemos ojspdemos-web http-web-site /ojspdemos

- Bind the JSTL war file to some web site, for example, http-web-site

   > java -jar $J2EE_HOME/admin.jar ormi://localhost   
   >       -bindWebApp ojspdemos standard-examples http-web-site /ojspdemos/jstl

      Note: you need only deploy and bind both war files one time.  However, if you make 
      changes and rebuild the ear file (see below for rebuilding), please stop and re-start
      the web server once before copying in the new ear file.

IAS installation

   For an iAS installation deploy using the DCM Command-Line utility (dcmctl).

       > dcmctl deployApplication -file ./dist/ojspdemos.ear -a ojspdemos
       >	[-co ] [-rc ] 

    If the -co target option is not supplied, the operation is applied to all OC4J
    instances within the associated application server instance. Do not use the -rc
    option when deploying an EAR file.

    Please see the Oracle9iAS Containers for J2EE User's Guide for more information
    on dcmctl commands and options. 

Rebuilding

If you wish to rebuild the application you must have ant (an xml build tool from http://jakarta.apache.org/ant) - cd to the directory containing the build.xml from the unzipped jsp_demos.zip file - ant

Running

Access the OJSP application at http://<host>:<port>/ojspdemos. Access the JSTL application at http://<host>:<port>/ojspdemos/jstl. For example, on a standalone instance with the default port use, http://<machine_name>:<8888>/ojspdemos.

Some of the demos require additional support or configuration. The index page of the OJSP application provides additional information.