Oracle 9iAS Containers for J2EE 10g (10.0.3) Developer Preview

Date: 08-Sep-2003

Demo: JSP 2.0: The "eStore" Demo

This demo illustrates many new JSP features which are part of JSP 2.0 specification.  This demo primarily illustrates how to apply JSP 2.0 tag files feature.  In addition, the demo also shows how use the following new features:

  • Use of tag files
  • Simple attributes
  • Fragment type attributes
  • Page-scoped variables
  • EL(Expression Language) usage within tag files
  • JSTL tags - forEach, set, choose, when and otherwise
  • Using simple tag handler within a tag file

This demo is about a estore web front changing its look and feel based on the occasion and promoting products used for that particular occasion.

Software Requirements

Following are the software required for running and deploying this How-To.

  • OC4J 10g (10.0.3) is installed, available from OTN.

  •  
  • Sun's JDK 1.4.x is installed, available here.

Notation

  • %OC4J_HOME% - The directory you installed OC4J.

  •  
  • %J2EE_HOME% - The directory where the oc4j.jar file exists within OC4J. This is typically 2 directories under %OC4J_HOME%. For example, if you installed OC4J to c:\ then %J2EE_HOME% would be c:\j2ee\home.

  •  
  • %JAVA_HOME% - The directory where your JDK is installed.

Introduction

OC4J 10g ( 10.0.3) is the J2EE 1.4 preview release. JSP 2.0 is a major new addition to J2EE 1.4.  Along with the software, a number of how-tos are available that illustrate use of new J2EE 1.4 features.

In the zip you just extracted you will find ready to deploy estore.ear. Upon deploying the estore.ear file (instructions given below), you will find a detailed explanation of the demo along with access to all the source code.

Prerequisites for running the Demo

Before running the example make sure:

  • You have OC4J 10g (10.0.3) Developer Preview installed.

The contents of the ZIP file when extracted should include :

  • This file - estore-demo.html
  • estore.ear - Ready to deploy

Deploying the application

To deploy to OC4J 10g ( 10.0.3) use admin.jar utility.  The admin.jar utilty is located at %J2EE_HOME%.  Run the following two commands to deploy and bind your application.

a)  To deploy
     java -jar admin.jar ormi://<host>:<ormi-port > < uid> <pwd>
                                                    -deploy -file <path-to-file>/estore.ear
                                                    -deploymentName estore

b) To bind the URI for the web module
     java -jar admin.jar ormi://<host>:<ormi-port > < uid> <pwd>
                                                    -bindWebApp estore estore-web http-web-site /estore

    The default ormi port number is 23791 and the default password for the admin user is welcome.

     

Running the Application

To run the eStore Web application use the URI you bound in step (b).
http://hostname:8888/estore

Review the index page to understand the demo, how it works and how the new features listed in the Introduction section of this document are put to use.

List of JSP 2.0 How-tos/Demos of Interest

  • Tic-Tac-Toe Demo - Demo illustrates JSP 2.0 fragments and simple tag handler.  This demo is about the game of "Randomized TicTacToe".
  • How-to-tagfile - A tag file how-to example that connects to Oracle database, retrieves employee details from HR schema and demonstrates JSP 2.0 simple attributes, dynamic attributes by changing the SQL query and JSP 2.0 fragments by changing the look (color) of rows based on certain conditions being met.  This is a tutorial style how-to taking you step by step.
  • How-to-SimpleTag-Handler - This is also a tutorial style how to that illustrates creation and use of Simple Tag Handler class.  It uses similar scenario as in How-to-tagfile.
E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy