Friday, January 11, 2013

ADF Essentials - How Did He Do That?

Ho, ho, ho It's magic you know
Never believe, it's not so
It's magic, you know
Never believe, it's not so

    - From Pilot's "Ho Ho It's Magic"

I recently wrote about running ADF Essentials on an Apache Tomcat server.  After that article, several of you asked me to write about here I did it…so here you go.

First, know that it's not magic...I just like ELO's cover of the song above and have always wanted an excuse to use it.  In fact, it's really pretty simple.  Installing some ADF runtime libraries, being sure to include some files to support a JSF implementation (Tomcat is not JSF-enabled out of the box), and some simple configuration.  Heck, if I can do it, you can do it.

Second, none of this is my original work.  As I mentioned in the original post, I followed the roadmap laid out by Raphael Rodrigues.  Since then, I've also done it on Glassfish by following Shay Shmeltzer's directions (I also use Shay's Glassfish extension for JDeveloper) and on JBoss.  Works like a charm across the board.

So, let's get started with Tomcat…

Files You'll Need

You'll need to download the following files:

Apache Tomcat 7
Oracle ADF Essentials
Oracle ADF Faces Components Demo

Steps For A Local Installation and Configuration

1. Extract tomcat 7

2. Unzip the ADF Essentials zip file inside the %TOMCAT_HOME%\lib

3. Put the rcf-dvt-demo.war file inside the %TOMCAT_HOME%\webapps

4. Open the file %TOMCAT_HOME%\bin\catalina.bat (or .sh if you’re in a linux environment) and add in the end of the line ‘set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%’ this -Xms1024m -Xmx1024m. Failure to do this step may result in an OutOfMemory error at startup

5. Here's the toughest part of the whole deal.  Tomcat does not come with jsf jar’s, so you have to put there. In my case, I went to my local Oracle Jdeveloper installation and grabbed the required files:
      -  jsf-api.jar
      -  jsf-impl.jar
      -  glassfish.jstl_1.2.0.1.jar
Put these files into %TOMCAT_HOME%\lib

6. Start tomcat in %TOMCAT_HOME%\bin\startup.bat

If everything is fine, you will be able to open your favorite browser and type http://localhost:8080/rcf-dvt-demo/faces/index.jspx

So, that's how I got it done.  Try it yourself…have a little fun and let me know in the comments how it goes.

1 comment:

Anonymous said...

does it really works ?

I have try to deploy Fusion Web Application with ADF Essential on Tomcat for a week.

But, I have just perfomed to deploy the demo package : running only when "Oracle ADF Essentials and are deployed together" but I was not enable to run another Fusion Web Application on Tomcat
I have spend lot of time and I am actually really tired to try make it works.
Then, please, say me if it really works and if that's it, what are precisely your settings ?