Deploying Web Applications to Standalone OC4J or Oracle Application Server
A J2EE web module is packaged as a web archive (WAR) file which
contains one or more web components (servlets, JSPs) as well as the standard
J2EE web deployment descriptor, web.xml
,
and the OC4J-specific deployment descriptor, orion-web.xml
. Once
you've created the deployment profile containing the web components and the
appropriate deployment descriptor files, you can deploy it as a WAR or or a
standard J2EE Enterprise Archive (EAR) file. JDeveloper takes the resulting
EAR and deploys it to the target application server.
To deploy a web application (servlets, JSPs) to OC4J in JDeveloper:
- If not already done, create a deployment
profile for web applications (WAR).
- If not already done, create
an application server connection to the target application server before
deploying the WAR file.
- (Optional) If you want to edit either the
<webapp>.deploy profile or the
corresponding 
web.xml deployment descriptor settings, right-click the icon in Navigator
and choose Settings. To edit web.xml
directly, you can
right-click that node in the Navigator and choose XML Editor if you are knowledgeable
about the web.xml
format.
- (Optional) If you want to create another WAR deployment profile
in this project, right-click
web.xml and choose Create WAR Deployment
Profile.
- The WAR deployment profile icon
<webapp>.deploy appears in the
Navigator below the specified project. Select and right-click its
deployment profile icon. The context menu displays these deployment options:
- Deploy to <Name_of_server_connection>:
the web module is packaged as a WAR. JDeveloper also generates an EAR
file which contains the WAR before deploying to the selected application
server connection which you created earlier.
- Deploy to New Connection: Launches
the Connection Wizard which lets you create a new application server connection.
- Deploy to WAR file: the web module
is packaged as a WAR and saved to the local directory or mapped network
drive you specified earlier in the <webapp>.deploy
profile settings.
- Deploy to EAR file: the web module
is packaged as an EAR and deployed to the local directory or mapped network
drive you specified in the <webapp>.deploy
profile settings.
Notes:
- See About Deploying on Oracle9i
Application Server for information on deploying the EAR file to an Oracle9i
Application Server.
- The web module is deployed to the target deployment directory. See OC4J
Deployment Application Directory Structure or refer to the "Oracle Application Server
Containers for J2EE User's Guide" Part Number B10322-01
provided
with the Oracle Application Server documentation library for information on the
deployed location of the application files including the WAR and EAR files.
- The Web Container in OC4J provides full support for Servlets 2.3 and Java
Server Pages (JSP) 1.2. For more information, refer to the Sun Microsystems
Java Servlet Specification, Version 2.3:
http://www.javasoft.com/products/servlet/
- Make sure that the web application deployment descriptor is located inside
the web archive (WAR) file
WEB-INF/web.xml
.
Related topics
- About J2EE Applications and How They
Are Packaged and Deployed
- Deploying a BC4J Web Application to OC4J
- Configuring Your Project to Use the Embedded OC4J Server
- Deploying a BC4J UIX Application
- Deploying a Web Application to Other Application Servers