General Information
As of Ext-Scripting 1.0.6 basic Mojarra support has been implemented.
For now not the entire spectrum of services Ext-Scripting provides are enabled for Mojarra
but basic Ext-Scripting works out of the box.
Following compatibility diagram shows what
is provided for Mojarra and what is provided for MyFaces.
![](images/mojarra-support.jpg)
Image: Mojarra compatibility
Setup Steps
The setup is fairly straight forward.
Add the support jars (extscript-mojarra-bundle.jar) and setup your loader paths
just like you would do it for MyFaces.
The main difference is setting up the loader paths for Mojarra is
mandatory.
The mandatory loader paths are needed to avoid conflicts with Mojarras internal Groovy
support which utilizes the same paths. (This was a design decision to keep Mojarra compatibility
at a time Mojarra support was not really under discussion)
So here is an example configuration for Mojarra:
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<!-- ======================================================================================
Loader path for Groovy files
====================================================================================== -->
<context-param>
<description>Additional comma separated loader paths to allow direct editing on the sources directory instead
of the deployment dir
</description>
<param-name>org.apache.myfaces.extensions.scripting.groovy.LOADER_PATHS</param-name>
<param-value>
/Users/werpu2/development/workspace/extensions-scripting3/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy
</param-value>
</context-param>
<!-- ======================================================================================
Optional Loader Paths for Java Source Files
====================================================================================== -->
<context-param>
<description>Additional comma separated loader paths to allow direct editing on the sources directory instead
of the deployment dir
</description>
<param-name>org.apache.myfaces.extensions.scripting.java.LOADER_PATHS</param-name>
<param-value>
/Users/werpu2/development/workspace/extensions-scripting3/examples/myfaces20-example/src/main/webapp/WEB-INF/java
</param-value>
</context-param>
<!-- ======================================================================================
Loader path for Scala files
====================================================================================== -->
<context-param>
<description>Additional comma separated loader paths to allow direct editing on the sources directory instead
of the deployment dir
</description>
<param-name>org.apache.myfaces.extensions.scripting.scala.LOADER_PATHS</param-name>
<param-value>
/Users/werpu2/development/workspace/extensions-scripting3/examples/myfaces20-example/src/main/webapp/WEB-INF/scala
</param-value>
</context-param>
<!-- ======================================================================================
Optional Loader Paths for resource files
====================================================================================== -->
<context-param>
<description>resource paths for our custom JSF2 resource resolver</description>
<param-name>org.apache.myfaces.extensions.scripting.resources.LOADER_PATHS</param-name>
<param-value>
/Users/werpu2/development/workspace/extensions-scripting3/examples/myfaces20-example/src/main/webapp
</param-value>
</context-param>
<!-- ======================================================================================
Optional: Tell Facelets to load the resources from your source dir
====================================================================================== -->
<context-param>
<description>a redirecting Facelet resource resolver which allows to pick up templates and resources from our
source dir
</description>
<param-name>facelets.RESOURCE_RESOLVER</param-name>
<param-value>org.apache.myfaces.extensions.scripting.jsf.facelet.ReroutingResourceResolver</param-value>
</context-param>
<!-- ======================================================================================
Optional: Whitelist of root packages where your sources should come from
====================================================================================== -->
<context-param>
<description>a comma separated whitelist of root packages which are compiled those and nothing else
will be compiled during all compile stages, all other files stay permanently as they are
</description>
<param-name>org.apache.myfaces.extensions.scripting.PGK_WHITELIST</param-name>
<param-value>org.apache.myfaces.groovyloader.blog,org.apache.myfaces.javaloader.blog</param-value>
</context-param>
<!-- ======================================================================================
Optional Additional Classpath
====================================================================================== -->
<context-param>
<description>
Additional Classpaths which will be added to the compilers classpath
</description>
<param-name>org.apache.myfaces.extensions.scripting.PGK_ADDITIONAL_CLASSPATH</param-name>
<param-value>/usr/lib/java/myjar.jar,/usr/lib/java/myjar2.jar</param-value>
</context-param>
... faces config entries
</webapp>