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
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.
- (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.
- 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.
- (Optional) If you want to edit the J2EE WAR deployment profile,
select and right-click
<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:
- 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.
- (Optional) If you want to edit either the
<Project_jpr_WAR>.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 BC4J web application deployment profile, see Deploying
BC4J Web Applications.
Notes:
- The web module is deployed to the target deployment directory. For information on the
deployed location of the application files including the WAR and EAR files, 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.
- 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 WAR file:
WEB-INF/web.xml