DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Deployment of Spring MVC App on a Local Tomcat Server
  • Troubleshooting HTTP 502 Bad Gateway in AWS EBS
  • Redis-Based Tomcat Session Management
  • A Spring Boot App With Half the Startup Time

Trending

  • Spring AI Advisors: Chat Memory, Token Tracking, and Message Logging
  • The Agentic Agile Office: Streamlining Enterprise Agile With Autonomous AI Agents
  • From ETL to Lakeflow: Shifting to a Declarative Data Paradigm
  • AI Agents in Java: Architecting Intelligent Health Data Systems
  1. DZone
  2. Coding
  3. Languages
  4. How To: ADF Essentials 12c Application on Tomcat 8

How To: ADF Essentials 12c Application on Tomcat 8

Learn how to run the ADF Essentials app on Tomcat.

By 
Rebecca Pruess user avatar
Rebecca Pruess
·
May. 17, 19 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
26.2K Views

Join the DZone community and get the full member experience.

Join For Free

Oracle ADF Essentials is powerful framework to develop web applications and is free to use. FlexDeploy is built using ADF Essentials 12.1.3 and is now available to run on Tomcat 8 and Java 1.8. See FlexDeploy Installation for Tomcat for more details.

Here are some high level steps to run your ADF Essentials applications on Tomcat 8. Deploying an ADF Essentials application to Tomcat can be tricky at first; these steps are for ADF Essentials 12.1.3 and Tomcat 8, so if you are running different version, you may have some challenges. Once your Tomcat environment is configured, you can use FlexDeploy JDeveloper and Tomcat plugin to automate Build/Deploy process.

Prepare Tomcat Environment

First step is to prepare Tomcat 8 environment with ADF Essentials library files. Download 12.1.3 Oracle ADF Essentials and Oracle ADF Essentials Client Files from http://www.oracle.com/technetwork/developer-tools/adf/downloads/adf-download-1649592.html. Save download files in temporary folder.

adfessentials_downloadExtract both zip files in flat structure using unzip -j (works on Windows and UNIX)

  • cd <tomcat lib folder>
  • unzip -j <path to temp folder>/adf-essentials.zip
  • unzip -j <path to temp folder>/adf-essentials-client-ear.zip

You can copy any additional Jars that may be necessary for your application. You may have to copy database drivers to Tomcat lib folder as well. For example, you can download Oracle JDBC drivers from http://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html.

Now update context.xml as shown below to create Data Source for your application.

tomcat_datasource

Now update setenv.sh or setenv.bat file in Tomcat/bin folder.

TomcatSetEnvFilePrepare Application for Tomcat Deployment

Remove following listener classes from web.xml. This should be done in automated build process.

  1. oracle.bc4j.mbean.BC4JConfigLifeCycleCallBack
  2. oracle.adf.mbean.share.connection.ADFConnectionLifeCycleCallBack
  3. oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBack

Build WAR and Deploy

Now, let’s build Deployment Profile in JDeveloper to build war file for deployment to Tomcat server. This process is same for any other Deployment Profile, but you will need to enable various jar files to be added to WAR file (see below)

tomcat_profile_1

tomcat_profile_2

tomcat_profile_3

There are various libraries (JSF 2.1, ADF PageFlow Runtime, ADF Controller Runtime, ADF Faces Runtime 11, ADF Faces Databinding Runtime, JSTL 1.2 Tags, Oracle Page Templates, ADF Model Runtime, BC4J Runtime), which are needed at Runtime but are not included in downloads specified earlier. Hence, make sure that following jar files are part of WAR file as shown in above image.

adf-controller-api.jar, adf-controller-rt-common.jar, adf-controller.jar, adf-dt-at-rt.jar, adf-faces-databinding-rt.jar, adf-pageflow-dtrt.jar, adf-pageflow-fwk.jar, adf-pageflow-impl.jar, adf-pageflow-rc.jar, adf-richclient-api-11.jar, adf-richclient-impl-11.jar, adfdt_common.jar, adflibfilter.jar, dvt-basemaps.jar, dvt-databindings.jar, dvt-faces.jar, dvt-facesbindings.jar, dvt-jclient.jar, dvt-shared-js.jar, dvt-trinidad.jar, dvt-utils.jar, oracle-page-templates.jar, trinidad-api.jar, trinidad-impl.jar

Now, build WAR file using deployment profile, place it in webapps folder, and restart Tomcat server. Look at log files for any errors and act accordingly. Most potential problems will be missing from some Jar file and you will need to include in WAR file using Deployment Profile.

Hope you found this quick tutorial helpful!

Apache Tomcat application

Published at DZone with permission of Rebecca Pruess. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Deployment of Spring MVC App on a Local Tomcat Server
  • Troubleshooting HTTP 502 Bad Gateway in AWS EBS
  • Redis-Based Tomcat Session Management
  • A Spring Boot App With Half the Startup Time

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook