Creating a Deployment Profile for BC4J Web Applications

In JDeveloper, when you create a Business Components for Java (BC4J) web application client such as a BC4J JSP, BC4J UIX JSP, or BC4J Struts JSP, JDeveloper automatically generates a J2EE web archive (WAR) deployment profile and its associated deployment descriptor file, web.xml, which defines the standard web application deployment descriptor parameters. Typically, a JSP client accesses the BC4J application in a J2EE web module configuration. The JSP client can also include data tags, data web beans, XSQL, tag libraries, and UIX tags to access the business components.

The WAR file contains both the BC4J and the web application files. The JDeveloper deployment profile wizards create all the necessary code to deploy business components as a WAR to the embedded OC4J server or target server. 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.

To create a deployment profile for BC4J web applications:

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. (Optional) If you do not want to deploy your business components logic directly to the J2EE web module, you must first create a deployment profile and choose to configure an EJB session bean. For more information on the common deployment configurations and how to determine whether to deploy directly to the web module, see Understanding the n-Tiered Business Components Architecture.
  2. Create a web client application project (for example, BC4J JSP) containing your client application files.
    Note: When selecting the Application Module and deployment configuration, choose the configuration that you want your JSP to use to connect to the deployed application module. For example, choosing <YourApplicationModule>Local would deploy the business logic to the web module. Choosing <YourApplicationModule>9iAS or <YourApplicationModule>WLS instructs the JSP to use the business logic in the EJB session bean (created in step 1). Upon creation of the client application project, JDeveloper generates the web.xml and the WAR deployment profile.
  3. (Optional) If you want to edit the J2EE WAR deployment profile, select and right-click WAR_dep_profile_icon <Project_jpr_WAR>.deploy profile on the Navigator below the specified project. 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.
    11. Click OK when you are done.
  4. (Optional) If you want to edit either the WAR_dep_profile_icon <Project_jpr_WAR>.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.
  5. To deploy the BC4J web application deployment profile, see Deploying BC4J Web Applications.

Notes: