Skip to main content

TOTD #50: Mojarra 2.0 EDR2 is now available - Try them with GlassFish v3 and NetBeans 6.5

Posted by arungupta on October 23, 2008 at 8:35 AM PDT



Yaaay, 50th tip!! The previous 49 tips are available href="http://blogs.sun.com/arungupta/tags/totd">here.



Mojarra EDR2 is now href="http://weblogs.java.net/blog/driscoll/archive/2008/10/announcing_jsf_1.html">available
- download href="https://javaserverfaces.dev.java.net/files/documents/1866/114605/mojarra-2.0.0-EDR2-binary.zip">binary
and/or
href="https://javaserverfaces.dev.java.net/files/documents/1866/114606/mojarra-2.0.0-EDR2-source.zip">source
bundle!



GlassFish
v2 UR2 ships with Mojarra 1.2.0_04 and v3 prelude comes with 1.2.0_10.
The Mojarra binaries in both v2 and v3 can
be easily replaced by the new ones as described in href="https://javaserverfaces.dev.java.net/nonav/rlnotes/2.0.0/releasenotes.html">Release
Notes. Additionally, href="http://blogs.sun.com/arungupta/entry/totd_47_getting_started_with">TOTD#
47 explains how to get started with Mojarra 2.0 on GlassFish
v2. This blog will guide you through the steps of installing these bits
on GlassFish v3 Prelude and show how to use them with href="http://netbeans.org">NetBeans IDE.

  1. Download latest href="http://download.java.net/glassfish/v3-prelude/promoted/">GlassFish
    v3 prelude and unzip.
  2. Start Updatetool from "bin" directory. The first run of the
    tool downloads and installs the tool. Start the tool by typing the
    command again to see the screen shown below:



    src="http://blogs.sun.com/arungupta/resource/images/gfv3-28b-update-center.png">
  3. Click on "Update", "Accept" the license and the component
    is then installed in GlassFish directory. Optionally, you can click on
    "Installed Components" and then verify that bits are installed
    correctly.
  4. An EDR2 compliant application can now be directly deployed
    in these GlassFish v3 bits. There is some work required in order to use
    code completion, auto-fixing of Imports  and similar features
    in NetBeans
    6.5 RC
    . The steps below describe that.
    1. In "Tools", "Libraries", click on "New Library ...",
      enter the name "JSF2.0" as shown:



      src="http://blogs.sun.com/arungupta/resource/images/mojarraedr2-nb65rc-libraries.png">
    2. Click on "OK", "Add JAR/Folder..." and pick
      "glassfishv3-prelude/glassfish/modules/jsf-api.jar", click on "OK".
    3. Right-click on the NetBeans project, select "Properties",
      "Libraries" and remove "JSTL1.1" and "JSF1.2" libraries.
    4. Click on "Add Library ...", select the newly created
      "JSF2.0" library, click "Add Library" and then "OK".
  5. In order to run "Cities" application on these GlassFish
    bits copy MySQL Connector/J jar in "glassfishv3-prelude/glassfish/lib"
    directory and then deploy the application.



Here are some pointers to get started:

  • href="http://jcp.org/aboutJava/communityprocess/edr/jsr314/index2.html">EDR2
    Specification
  • href="https://javaserverfaces.dev.java.net/nonav/docs/edr2/javadoc/index.html">Javadocs
  • href="https://javaserverfaces.dev.java.net/nonav/rlnotes/2.0.0/releasenotes.html">Release
    Notes
  • href="https://javaserverfaces.dev.java.net/nonav/docs/edr2/jsdoc/index.html">JavaScript
    API
  • href="https://javaserverfaces.dev.java.net/nonav/docs/edr2/pdldoc/jsp/index.html">JSP
    TLD
  • href="https://javaserverfaces.dev.java.net/nonav/docs/edr2/pdldoc/facelets2/index.html">Facelets2
    TLD



Have you tried your JSF 1.2 app on Mojarra 2.0 ? Drop a comment on this
blog if you have.




File JSF related bugs href="https://javaserverfaces.dev.java.net/issues/enter_bug.cgi?issue_type=DEFECT">here
using "2.0.0 EDR2" version and ask your questions on href="mailto:webtier@glassfish.dev.java.net">webtier@glassfish.dev.java.net.



Please leave suggestions on other TOTD ( style="font-weight: bold;">Tip style="font-weight: bold;">Of style="font-weight: bold;">The style="font-weight: bold;">Day) that
you'd like to see.
An archive of all the tips is available href="http://blogs.sun.com/arungupta/tags/totd">here.




Technorati: totd
javaserverfaces
mojarra
glassfish
v3 href="http://technorati.com/tag/netbeans">netbeans

Related Topics >>