You are on page 1of 17

Deploying an ADF Application

Copyright 2004, Oracle. All rights reserved.


Objectives

After completing this lesson, you should be able to do


the following:
Create a remote OracleAS Containers for J2EE
(OC4J) Connection in JDeveloper
Configure OC4J for application deployment
Use the JDeveloper Deployment Wizard to deploy
to OC4J
Run a JSP application in OC4J

17-2 Copyright 2004, Oracle. All rights reserved.


Overview

Servlet/JSP/HTML

Packaging Deployment

Libraries, Packages

17-3 Copyright 2004, Oracle. All rights reserved.


Overall Considerations for Deployment

Packaging and distributing involves:


Class files
Libraries
HTML files
How you set up the deployment environment
depends on the server.

17-4 Copyright 2004, Oracle. All rights reserved.


J2EE Archive Format

Archive Type Module Type Software Content


Java Archive (JAR) J2EE client module Java Application
components
EJB JAR J2EE EJB module Enterprise
JavaBeans (EJB)
components
Web Archive (WAR) J2EE Web module Servlets and
JavaServer Pages
(JSP) components
Enterprise Archive Not applicable J2EE application
(EAR)

17-5 Copyright 2004, Oracle. All rights reserved.


Deploying to a Web Server

Copy the files with the extensions .jsp, .html,


.gif, to the document root directory of the Web
server.
Archive class files in an archive (.JAR, .WAR) file.
Set the class path of the Web server to point to the
archive files.

17-6 Copyright 2004, Oracle. All rights reserved.


Deploying to OC4J

OC4J is a J2EE-compliant Web server, included with


OracleAS 10g. To deploy to OC4J, perform the
following:
1. Install OC4J.
2. Start the remote OC4J server by issuing the
following from a command prompt:
<oc4j directory> java jar oc4j.jar
3. Create an OC4J Connection in JDeveloper.
4. Deploy the project by right-clicking
webapp1.deploy and selecting Deploy.

17-7 Copyright 2004, Oracle. All rights reserved.


Install OC4J

1. Open a command window.


2. Navigate to <ias_Home>/j2ee/home.
3. Run the following command:

% java -jar oc4j.jar -install

This command unpacks and installs OC4J.


4. Enter a password for the OC4J administrator
account.

17-8 Copyright 2004, Oracle. All rights reserved.


Start the OC4J Server

To start the OC4J server, use the following from the


OC4J home directory, usually
<iAS_Home>/j2ee/home

% java -jar oc4j.jar

The server can be stopped by using the following


command:

% java -jar admin.jar ormi://localhost/


<admin> <password> -shutdown

17-9 Copyright 2004, Oracle. All rights reserved.


Creating an OC4J Connection

17-10 Copyright 2004, Oracle. All rights reserved.


Creating an OC4J Connection

17-11 Copyright 2004, Oracle. All rights reserved.


Creating a Deployment Profile

Creating a deployment profile enables you to specify


how the J2EE application is deployed:

17-12 Copyright 2004, Oracle. All rights reserved.


Deploying to OC4J

17-13 Copyright 2004, Oracle. All rights reserved.


Running Applications

To run the deployed application, call the following


URL:
http://hostname:8888/<workspacename>-<projectname>-
context-root/main.jsp

The context root can be customized in the deployment


profile.

17-14 Copyright 2004, Oracle. All rights reserved.


Customizing Deployment

To change the names of directories used in


deployment, double-click the .deploy file.

17-15 Copyright 2004, Oracle. All rights reserved.


Summary

In this lesson, you should have learned how to:


Package the applications that you develop for
deployment in a Web server
Create an OC4J connection in JDeveloper
Deploy your application to the Oracle9i
Application Server

17-16 Copyright 2004, Oracle. All rights reserved.


Practice 17-1: Overview

This practice covers the deployment of an ADF BC-


based JSP application.

17-17 Copyright 2004, Oracle. All rights reserved.

You might also like