You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2011/03/18 11:27:59 UTC

[Myfaces Wiki] Trivial Update of "Drafts/Site/Core" by BartKummel

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The "Drafts/Site/Core" page has been changed by BartKummel.
http://wiki.apache.org/myfaces/Drafts/Site/Core?action=diff&rev1=6&rev2=7

--------------------------------------------------

  The Core project currently has branches for each of these JSF versions. The 1.1, 1.2 and 2.0 versions are stable and are updated regularly. 
  
  == Why should I use MyFaces Core? ==
- Every Java EE application server comes with a bundled JSF implementation. Often the reference implementation (RI), known as "Mojarra", is used for this. However, you can bundle an alternative JSF implementation to be used with your project. This way, you can use MyFaces Core as JSF implementation on every Java EE application server. One of the benefits of using MyFaces Core is that it generates more informative logging, which can be helpful while debugging. If you're looking for an application server that uses MyFaces Core by default, you should take a look at Apache Geronimo.
+ Every Java EE application server comes with a bundled JSF implementation. Often the reference implementation (RI), known as "Mojarra", is used for this. However, you can bundle an alternative JSF implementation to be used with your project. This way, you can use MyFaces Core as JSF implementation on every Java EE application server. One of the benefits of using MyFaces Core is that it generates more informative logging, which can be helpful while debugging. If you're looking for an application server that uses MyFaces Core by default, you should take a look at [[http://geronimo.apache.org/|Apache Geronimo]].
  
  == Getting started ==
  So you want to use MyFaces Core as the JSF implementation in your project. This section tells you how to get started.
  
  === Maven ===
- If you're using Maven to manage dependencies, you can use on of the Maven archetypes provided by the [[Drafts/Site/MavenArchetypes|Maven archetypes]] sub project to generate an empty project with all of the libraries you need already in place. See the [[Drafts/Site/MavenArchetypes|Maven archetypes]] for details. After you've created a project, continue with the [[#Configuring MyFaces]] section.
+ If you're using Maven to manage dependencies, you can use on of the Maven archetypes provided by the [[Drafts/Site/MavenArchetypes|Maven archetypes]] sub project to generate an empty project with all of the libraries you need already in place. See the [[Drafts/Site/MavenArchetypes|Maven archetypes]] for details. After you've created a project, continue with the [[#Configuring MyFaces|Configuring MyFaces]] section.
  
  === Managing dependencies manually ===
  If you're not using Maven, you'll have to manage your dependencies manually. This section describes what's needed to add MyFaces Core as a dependency to you project.
  
   1. '''Downloading Apache MyFaces Core'''.
-     a. The latest version of MyFaces Core can be downloaded from the [[http://myfaces.apache.org/download.html|MyFaces Core donwload page]]. Depending on hte JSf version you want to use, you should download a MyFaces Core 1.1.x, 1.2.x or 2.0.x version. (I.o.w.: the first two digits of the MyFaces Core version correspond to the JSf version it is designed for.)
+     a. The latest version of MyFaces Core can be downloaded from the [[http://myfaces.apache.org/download.html|MyFaces Core donwload page]]. Depending on hte JSF version you want to use, you should download a MyFaces Core 1.1.x, 1.2.x or 2.0.x version. (I.o.w.: the first two digits of the MyFaces Core version correspond to the JSF version it is designed for.)
      a. MyFaces Core is available as .zip and .tar.gz file. If you're working on Windows, you should download the .zip, otherwise, you can download the .tar.gz.
   1. '''Unpacking the downloaded file'''. Use your favorite unzip / unarchive tool to unpack the downloaded file. If everything went well, you should end up with a single directory called {{{myfaces-core-x.y.z-bin}}}, where {{{x.y.z}}} is the version number.
   1. '''Adding the JARs to you classpath'''. Inside the {{{myfaces-core-x.y.z-bin}}} directory is a {{{lib}}} directory, that contains a collection of {{{.jar}}} files. For your reference, here's a drill down of the contents of the {{{lib}}} directory in the distribution:
@@ -30, +30 @@

      * {{{myfaces-api-x.y.z.jar}}}: the JSF API. These are all the interfaces and classes that are called from the outside. In other words, these are those things you import from the {{{javax.faces}}} package.
      * {{{myfaces-bundle-x.y.z.jar}}}: a combination of the previous two in one single JAR. 
      * {{{commons-......jar}}}: a series of libraries from the Apache Commons project, that MyFaces Core depends on. 
-  You should add either the {{{myfaces-impl-x.y.z.jar}}} and {{{myfaces-api-x.y.z.jar}}} or the {{{myfaces-bundle-x.y.z.jar}}} to your project's classpath. Further more, all {{{commons-......jar}}} files should also be added to the classpath. The procedure to add JARs to a classpath differs, depending on the IDE you are using for your project. After you've set the dependencies for you project, continue with the [[#Configuring MyFaces]] section.
+  You should add either the {{{myfaces-impl-x.y.z.jar}}} and {{{myfaces-api-x.y.z.jar}}} or the {{{myfaces-bundle-x.y.z.jar}}} to your project's classpath. Further more, all {{{commons-......jar}}} files should also be added to the classpath. The procedure to add JARs to a classpath differs, depending on the IDE you are using for your project. After you've set the dependencies for you project, continue with the [[#Configuring MyFaces|Configuring MyFaces]] section.
  
  == Configuring MyFaces ==
  There are two important configuration files for a JSF application—{{{web.xml}}} and {{{faces-config.xml}}}. We will discuss the basics of both of them.
@@ -80, +80 @@

  </faces-config>
  }}}
  
- === Additional configuration for Glassfish===
+ === Additional configuration for Glassfish ===
  To use MyFaces Core as the JSF implementation on a Glassfish 2.x application server, we have to make some additional settings in a GlassFish-specific configuration file—{{{sun-web.xml}}}. This file has to be in the {{{WEB-INF}}} folder of our project, along with most of the other configuration files, such as {{{web.xml}}} and {{{faces-config.xml}}}. The contents of the file should look like this:
  {{{#!xml
  <?xml version="1.0" encoding="UTF-8"?>