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 webxmlicon web.xml file already exists in your project, you can right-click webxmlicon web.xml and choose Create WAR Deployment Profile from the context menu to quickly create this profile.

  1. In the Navigator, select the project_icon <projectname>.jpr in which you want to create the WAR deployment profile.
  2. Choose File | New to open the New Gallery.
  3. In the Categories tree, expand General and select Deployment Profiles.
  4. In the Items list, double-click WAR File - J2EE Web Module.
  5. Click OK.
  6. Specify a location for the <webapp_name>.deploy profile or accept the defaults.
  7. Click Save.
  8. The WAR Deployment Profile Settings panel displays. Configure the settings for each page as appropriate:
    1. General Page
    2. WAR File Page: Directory View and Rules View
    3. WAR Options Subpage
    4. WEB-INF/classes Subpage
    5. WEB-INF/lib Subpage
    6. (Optional) Applet Options Page: to include an applet in your deployment profile. See Deploying an Applet as a WAR File.
    7. (Optional) Applet Classes Subpage
    8. (Optional)Applet Archives Subpage
    9. (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.
    10. (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.

  9. Click OK when you are done.

    The newly created WAR_dep_profile_icon <webapp>.deploy deployment profile and its corresponding webxmlicon web.xml deployment descriptor icons appear in the Navigator below the specified project.

  10. 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.
  11. (Optional) If you want to edit either the WAR_dep_profile_icon <webapp>.deploy profile or the webxmlicon 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.
  12. To deploy the J2EE web application deployment profile, see Deploying Web Applications.

Notes:


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