Creating a Deployment Profile for Web Applications
When you use JDeveloper's integrated development environment to create J2EE
web components such as JSPs and servlets and Business
Components for Java (BC4J) web applications, the web.xml
and/or
orion-web.xml
(for OC4J deployments only) deployment descriptors
are automatically generated and added to the project.
However, as part of the deployment process in JDeveloper, you must also create
the web archive (WAR) deployment profile containing the web components
and its corresponding deployment descriptor files. You can choose to package
them into a standard J2EE WAR or into a Enterprise Archive (EAR) file for deployment.
Note: If deploying to Apache Tomcat, see Deploying
Web Applications to Apache Tomcat.
To create a WAR deployment profile for web applications in JDeveloper:
Tip: If a
web.xml file already exists in your project, you can right-click
web.xml
and choose Create WAR
Deployment Profile from the context menu to quickly create this profile.
- In the Navigator, select the
<projectname>.jpr in which you
want to create the WAR deployment profile.
- Choose File | New
to open the New Gallery.
- In the Categories tree, expand General
and select Deployment Profiles.
- In the Items list, double-click WAR
File - J2EE Web Module.
- Click OK.
- Specify a location for the
<webapp_name>.deploy
profile or accept the defaults.
- Click Save.
- The WAR Deployment Profile Settings panel displays.
Configure the settings for each page as appropriate:
- General Page
- WAR File Page: Directory
View and Rules View
- WAR Options Subpage
- WEB-INF/classes Subpage
- WEB-INF/lib Subpage
- (Optional) Applet
Options Page: to include an applet in your deployment profile. See
Deploying an Applet as a WAR
File.
- (Optional) Applet
Classes Subpage
- (Optional)Applet
Archives Subpage
- (Optional) Profile
Dependencies Page: if the deployment
profile depends on J2EE modules from another deployment profile. JDeveloper
lets you build a WAR deployment profile that can specify EJB JAR or WAR
dependencies from other projects. Thus, when the WAR is deployed to the
target application server, the corresponding dependencies are also packaged
with the WAR file in a single Enterprise Archive (EAR) file.
- (Optional) Platform Subpage:
JDeveloper lets you specify a default connection to be displayed in the
context menu of the web application deployment profile, and lets you specify
the target platform. You can also pass
command line parameters to any of the supported target connection types.
- Click OK when you are done.
The newly created
<webapp>.deploy deployment profile
and its corresponding
web.xml
deployment descriptor icons appear in the Navigator below
the specified project.
- By default, you can run and debug the WAR components in JDeveloper's embedded
OC4J server to test the application. However, when you are ready to deploy
the resulting WAR or EAR to the target application server, make sure to create
an application server connection.
- (Optional) If you want to edit either the
<webapp>.deploy profile or the
web.xml deployment descriptor settings, right-click its icon and choose
Settings. Alternatively, you can choose
Code Editor if you are knowledgeable about the
web.xml
format.
- To deploy the J2EE web application deployment profile, see Deploying
Web Applications.
Notes:
- 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" 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 which you can download from:
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
- About J2EE Web Modules in JDeveloper
- 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