This document describes the setup for the Descriptor Systems EJB, Servlet and JSP Programming workshops.
This document applies to version 1.1.0 of the EJB, Servlet and JSP Programming workshops. These versions of the courses use the Oracle Containers for Java (OC4J) version 9.0.3.
Important: Please print this document and as you install the software, mark up the document with the actual directory paths where you installed the software. Then leave a copy of the marked-up document for the instructor.
The setup for all of the J2EE workshops is basically the same, with a few differences noted in the text. If you are installing for a class that combines the Servlet and JSP workshops, please install both sets of the Lab Exercise Software and Instructor Display materials as described below.
With the exception of the operating system, all of the required software is available at no charge for download (some packages will require you to register on a website).
If you have questions or difficulties with the installation, you can contact Joel Barnum at jbarnum@descriptor.com or 319-362-3906.
Instructor machine hardware is the same as students, plus the additional requirements listed below.
Instructor machine software is the same as students, plus the additional requirements listed below.
Install the operating system. Be sure to install TCP/IP networking and give the computer a TCP/IP hostname. Install Internet Explorer if necessary.
Note: You will need administrator privileges to install the required software.
Create a folder in the root directory of drive C: named java. You will install the required software into this directory.
Download the Java2 Standard Edition Software Development Kit (JSDK) version 1.4.x for Windows and documentation package from:
http://java.sun.com/j2se/
Note: Be sure to download the SDK, not the JRE!
Install the JSDK to the c:\java directory. You should end up with a subdirectory c:\java\j2sdk1.4.1 or something like that. Then unzip the documentation package to the same drive where you installed the JSDK (the goal is to get the "docs" directory as a a subdirectory under the JSDK directory).
Update the PATH environment variable. Go to Start - Settings - Control Panel - System and select the Environment tab. Put the following string at the beginning of the System PATH environment variable:
c:\java\j2sdk1.4.1\bin;
Make sure the drive and directory match where you actually installed the JSDK.
To test the JSDK installation, choose Start - Programs - Command Prompt and then enter:
java -fullversion
You should see the version number of the JSDK that you installed. Then type:
javac
You should see the sign-on message from the Java compiler. If not, re-check the PATH environment variable you set up in a previous step.
To test the JSDK documentation, open your web browser and open the file C:\java\j2sdk1.4.1\docs\index.html. (Substitute the correct path for where you installed the documentation package.) You should see the JSDK documentation home page.
Download the HypersonicSQL open-source, free database from:
http://hsql.sourceforge.net
Use WinZip or other unzip program to unzip the hsql_143.zip file to the c:\java directory. You should end up with a subdirectory named c:\java\hypersonicsql. If you use WinZip to unzip the archive, make sure to select WinZip's "Use Folder Names" option when extracting.
Download Ant from:
http://jakarta.apache.org
Download the latest Binaries, release-build for Ant as a .ZIP file. The file name should be similar to jakarta-ant-1.5.1-bin.zip. Unzip the archive to the c:\java directory. You should end up with a subdirectory named c:\java\jakarta-ant-1.5.1 or similar.
Then go to Start - Settings - Control Panel - System and select the Environment tab. Put the following string at the beginning of the System PATH environment variable:
c:\java\jakarta-ant-1.5.1\bin;
Make sure the drive and directory match where you actually installed Ant.
Then define two new System environment variables:
ANT_HOME=c:\java\jakarta-ant-1.5.1
JAVA_HOME=c:\java\j2sdk1.4.1
Please ensure that the drive and directories of these setting match where you installed Ant and the JSDK
To test the Ant installation, close any existing Command Prompt windows, then open a new Command Prompt and enter:
ant -version
You should see the version number of Ant. If not, re-check the PATH environment variable.
Download, install and test the Oracle J2EE containers by following these steps:
Download the "Oracle9iAS Containers for J2EE(OC4J)", version 9.0.3. from:
http://otn.oracle.com/software/products/ias/htdocs/utilsoft.html
You will need to accept the license agreement and register a free Oracle Technology Network account if you don't already have one.
Download version 9.0.3. The filename should be "oc4j_extended.zip" and is about 24MB in size.
Create a folder named "oracle" (no quotes) in the c:\java directory.
To install the Oracle J2EE containers, unzip the archive to the "java\oracle" directory. This should create a directory structure like: c:\java\oracle\j2ee\home.
Unfortunately, the Oracle J2EE containers ship with a down-level version of the standard Java "tools.jar" file. To fix this problem, copy the tools.jar file from C:\java\j2sdk1.4.1\lib to C:\java\oracle\jdk\lib.
Follow these steps to configure the container for labs:
Use Notepad or other editor to edit the "global-web-application.xml" file in the "c:\java\oracle\j2ee\home\config" directory. Locate the text:
<servlet-name>jsp</servlet-name>
Under the "servlet-name" line, find the line that looks like:
<load-on-startup>0</load-on-startup>
Immediately following the "load-on-startup" line, enter the following:
<init-param>
<param-name>javaccmd</param-name>
<param-value>c:\java\j2sdk1.4.1\bin\javac</param-value>
</init-param>
<init-param>
<param-name>debug_mode</param-name>
<param-value>true</param-value>
</init-param>
Be sure to substitute the correct path for where you installed the Java SDK for the "javaccmd" value and be sure to use an underscore in "debug_mode" rather than a hyphen.
Then define a new System environment variable:
OC4J_HOME=c:\java\oracle\j2ee\home
Be sure to substitute the correct path for where you installed the container.
To test the containers, open a command prompt and change to the c:\java\oracle\j2ee\home directory and type:
java -jar oc4j.jar -install
Enter "admin" with no quotes for the password.
Then start the containers running:
java -jar oc4j.jar
You should see a sign-on message. Leave the containers running for the next step.
Test the container's JSP function, which will also verify that it will work for servlets or EJBs. Please follow these steps:
Use Notepad or other editor to create a file named test.jsp in the c:\java\oracle\j2ee\home\default-web-app directory. Insert the following into the test.jsp file:
<html><body>
<%= new java.util.Date() %>
</body></html>
Save the file (if you use Notepad, when you save, set the "Save as type" to "All Files" and make sure that the file has a .jsp extension).
Start your browser and enter the following URL:
http://localhost:8888/test.jsp
If the container is installed and configured correctly, you should see a web page showing the current time and date. If you see a "JspCompilerException" error, re-check the "javaccmd" init-parameter in the global-web-application.xml file as described in an earlier step. Note: If you edit that file, you will need to stop the containers (press Control-C in its window) and restart them before refreshing the browser.
Install the JEditor text editor. The latest version is available from:
http://jedit.sourceforge.net/index.php?page=download
Download the latest "stable" version Java installer.
To install JEdit, follow the instructions given on the JEdit web page.
Install the Lab Exercise Software for the workshop for which you are installing. If you are running a combined Servlet and JSP class, you should install both sets of Lab Exercise Software.
If you are installing for the Servlet Programming workshop, follow these instructions:
Download the Servlet Programming Lab Exercise Software from http://www.descriptor.com/courseware/j2ee-setup/version1.1.0-oracle/servclass.zip
Unzip the servclass.zip archive to the root directory, preferably on drive C:. To determine if the archive expanded properly, look in the "servclass" directory on the drive where you unzipped the archive. The "servclass" directory should contain a series of subdirectories, e,g, "lab01", "lab02" and so forth.
If you are installing for the JSP Programming workshop, follow these instructions:
Download the JSP Programming Lab Exercise Software from http://www.descriptor.com/courseware/j2ee-setup/version1.1.0-oracle/jspclass.zip
Unzip the jspclass.zip archive to the root directory, preferably on drive C:. To determine if the archive expanded properly, look in the "jspclass" directory on the drive where you unzipped the archive. The "jspclass" directory should contain a series of subdirectories, e,g, "lab01", "lab02" and so forth.
If you are installing for the EJB Programming workshop, follow these instructions:
Download the EJB Programming Lab Exercise Software from http://www.descriptor.com/courseware/j2ee-setup/version1.1.0-oracle/ejbclass.zip
Unzip the ejbclass.zip archive to the root directory, preferably on drive C:. To determine if the archive expanded properly, look in the "ejbclass" directory on the drive where you unzipped the archive. The "ejbclass" directory should contain a series of subdirectories, e,g, "rmi", "helloworld" and so forth.
Repeat the Student software setup on the instructor machine.
Install the Instructor Display Materials for the workshop for which you are installing. If you are running a combined Servlet and JSP class, you should install both sets of Instructor Display Materials.
If you are installing for the Servlet Programming workshop, follow these instructions:
Download the Servlet Instructor Display Materials from http://www.descriptor.com/courseware/j2ee-setup/servlet-presentation.zip
Unzip the servlet-presentation.zip archive to the root directory on the same drive where you installed the lab software. To determine if the archive expanded properly, look in the "j2eeclass\foils\servlet" directory on the drive where you unzipped the archive. The "j2eeclass\foils\servlet" directory should contain a "servlet.crs" file and a series of subdirectories, e,g, "chap02", "chap03" and so forth.
If you are installing for the JSP Programming workshop, follow these instructions:
Download the JSP Instructor Display Materials from http://www.descriptor.com/courseware/j2ee-setup/jsp-presentation.zip
Unzip the JSP-presentation.zip archive to the root directory on same drive where you installed the lab software. To determine if the archive expanded properly, look in the "j2eeclass\foils\jsp" directory on the drive where you unzipped the archive. The "j2eeclass\foils\jsp" directory should contain a "jsp.crs" file and a series of subdirectories, e,g, "install", "syntax" and so forth.
If you are installing for the EJB Programming workshop, follow these instructions:
Download the EJB Instructor Display Materials from by clicking http://www.descriptor.com/courseware/j2ee-setup/ejb-presentation.zip
Unzip the ejb-presentation.zip archive to the root directory of the same drive where you installed the lab software. To determine if the archive expanded properly, look in the "j2eeclass\foils\ejb" directory on the drive where you unzipped the archive. The "j2eeclass\foils\ejb" directory should contain a "ejb.crs" file and a series of subdirectories, e,g, "chap01", "chap02" and so forth.
Download and install the Courseware Viewer program. Note: All of the workshops share the same Courseware Viewer, so you only need to download and install it once, even if you are running a combined workshop.
Download the Viewer from:
http://www.descriptor.com/viewer/binaries/winsetup.zip
Unzip this archive to a temporary directory on the Instructor machine. Then run the "setup.exe" program to install the Courseware Viewer. During installation, you will need to reference the JSDK that you installed in an earlier step.
After installation, start the Courseware Viewer by choosing Start - Descriptor Systems - Courseware Viewer. In the Viewer, choose File - Open and open:
\j2eeclass\foils\jsp\jsp.crs
or
\j2eeclass\foils\servlet\servlet.crs
or
\j2eeclass\foils\ejb\ejb.crs
You should see the screen show for the appropriate workshop.