Getting started with Java Server Faces (JSF) using Apache MyFaces – in JDeveloper 10.1.3EA

Lucas Jellema 1
0 0
Read Time:4 Minute, 16 Second

Seen so much, heard so much, read so much: time to actually do a
little with Apache MyFaces. I am using the blog article by Jonas Jacobi
as my guide along the (first steps of the) way: MyFaces and the JDeveloper 10.1.3 EA release . I will be using the 10.1.3EA release of JDeveloper – to be downloaded from OTN. Apache MyFaces can be downloaded from the Apache website. This article will get a very simple JSF application running. Nothing more.


  1. Download and install JDeveloper 10.1.3EA1
  2. Download and install Apache MyFaces (binary distribution 27Mb) and the Samples (
    14Mb). I unpack the two zip-files to a JDEV_1013_HOME\myfaces
    directory. Per the suggestion from Jonas I unpack the simple.war
  3. I have downloaded the Jakarta ORO binary distribution from
  4. I downloaded a relatively random selection of Commons jars from
  5. Select Tools-> Manage Libraries… menu
  6. In the first tab “Libraries”, create a new library by clicking on the New button
  7. Enter
    MyFaces as the name and add the following libraries from your MyFaces
    download: myfaces-impl.jar,myfaces-api.jar, commons-[something].jar
    (fileupload and logging are optional), jakarta-oro.jar;  Close the Open
    dialog (Stay in the main dialog “Manage Libraries”)
  8. Now
    click on the JSP Tag Libraries tab; Click on the New button to create a
    new JSP tag library; Select the myfaces-impl.jar from the same location
    as above and click Open. You should now see two JSP tag libraries JSF
    Core 1.0.10 and JSF
    HTML 1.0.10. Make sure that “Execute in JSP visual editor” is checked
    for each library before you close the Manage Libraries dialog.
  9. If you want to add the Tomahawk library, repeat steps 7 and 8.

Now Jonas suggests we are ready to start developing an application. Let’s see.


Building an application using MyFaces

1. Create a new Application workspace and a new Project.
2. Double click on the Project to get to the Project Properties dialog.
3. In this dialog, select the Libraries node in the left pane.
4. Add the MyFaces library and the JSTL library to your project.

5. Now select the JSP tag libraries node in the left pane.

6. Add the JSF Core and the HTML tag libraries to your project (Optionally add your Tomahawk tag library)
7. Close the dialog.
8. You are now setup to start working with MyFaces. Right click on the Project node and select New…
9. In the new gallary select Web Tier -> JSF -> JSF JSP and click OK.

10. Step through the wizard and select optional component libraries.
Finish the wizard and your done with your first MyFaces page.
11. Drag and drop components from the Component Palette to populate
your page with cool MyFaces components. Let’s take it easy for now and
use a single, simple component. What about the Data Input (and I have
made use of the examples in Marty Hall’s tutorial, see below):

First create the JSP with InputDate component:

clearly we need two things: a backing bean and a naviagtion rule to
deal with the show-date situation. First the backing bean:

And the faces-config.xml to go with it:

I also made use of the faces-config console in JDeveloper – which may be the James Holmes console, I am not sure –

Now I can run my first application by simply running the JSP. The outcome is this HTML page:

simple but quite nice Date Entry popup – actually not a popup but a
sort of floating DIV element. After choosing a date and submitting the
query, the navigation rule takes me back to the same page, displaying
the selected date:

Running the Simple Example application

The MyFaces distribution includes the Core JSF Components as well as the extended set Tomahawk components. See MyFaces Components and Features for details.

first get a sample application up and running. I have copied the entire
contents of C:\jdev10_1_3_EA1\myfaces\demos\simple to my just created
JDeveloper 10.1.3 project
(C:\glassfish\MyFirstMyFaces\MyFacesProject1\public_html). I have
included all that’s in the public_html directory in the project:

Now I can run the index.jsp file and see whether my first MyFaces project is doing okay.

The index.jsp apparently immediately hands over to index.jsf. And that shows up in the browser:

It is actually working, Now I can go and develop a simple page myself.
See my next article on getting the Tree2 Component to work with EJB 3.0
Persistence based model data.


My Next Article on MyFaces: Apache MyFaces (open source JSF implementation) – Using the Tree2 Component with JDeveloper 10.1.3


Getting started with Apache MyFaces tutorial by Marty Hall

MyFaces and the JDeveloper 10.1.3 EA release by Jonas Jacobi

MyFaces Wiki

Getting started with  Apache MyFaces Рtutorial/quick start guide from Apache MyFaces website

About Post Author

Lucas Jellema

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director and Oracle Developer Champion. Solution architect and developer on diverse areas including SQL, JavaScript, Kubernetes & Docker, Machine Learning, Java, SOA and microservices, events in various shapes and forms and many other things. Author of the Oracle Press book Oracle SOA Suite 12c Handbook. Frequent presenter on user groups and community events and conferences such as JavaOne, Oracle Code, CodeOne, NLJUG JFall and Oracle OpenWorld.
0 %
0 %
0 %
0 %
0 %
0 %

Average Rating

5 Star
4 Star
3 Star
2 Star
1 Star

One thought on “Getting started with Java Server Faces (JSF) using Apache MyFaces – in JDeveloper 10.1.3EA

  1. I just saw the How To article on OTN: Using MyFaces with Oracle JDeveloper 10g (10.1.3) Preview, Written by Jonas Jacobi, Oracle Corporation February, 2005. This describes how to use the MyFaces implementation and the MyFaces custom components with Oracle JDeveloper 10g (10.1.3) Preview and ADF Faces. This HowTo is divided into two parts – one that is explaining how to get MyFaces custom components installed within Oracle JDeveloper 10g (10.1.3), and the second part is covering how to get Oracle ADF Faces components up and running with the MyFaces implementation.

Comments are closed.

Next Post

ASM made easy

Great article about ASM on the website of Howard Rogers:   For both Linux and Windows. Related posts: Use Data Tree in List of Values Window – ADF BC and UIX and JHeadstart Apache MyFaces (open source JSF implementation) – Using the Tree2 Component with JDeveloper 10.1.3 Implement JAAS based […]
%d bloggers like this: