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 2010/02/10 11:18:57 UTC

[Myfaces Wiki] Update of "HowToEnableEl22" by MarkStruberg

Dear Wiki user,

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

The "HowToEnableEl22" page has been changed by MarkStruberg.
http://wiki.apache.org/myfaces/HowToEnableEl22

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

New page:
= How To Enable ExpressionLanguage-2.2 in Tomcat6 and Jetty6 =

EL-2.2 is part of [[http://jcp.org/aboutJava/communityprocess/mrel/jsr245/index.html|JSR-245 MR2]] (JSP-2.2) and therefor not included in Tomcat6 nor Jetty6. This will be part of Tomcat7 and Jetty7, but with a few manual steps, you can use EL-2.2 even in current containers.

== EL-2.2 Implementation ==

Currently, the best Implementation we use is the one available from the glassfish project.
A Geronimo implementation is currently ongoing and will be available in a few months.
Until then we need to use el-api.jar and el-impl.jar from glassfish.

== Maven ==

To make the 2 required jars available for your project, you can simply use maven:

{{{
    <!-- EL 2 -->
    <dependency>
        <groupId>javax.el</groupId>
        <artifactId>el-api</artifactId>
        <version>2.2</version>
        <scope>provided</scope>
    </dependency>
    <profiles>
        <profile>
            <id>jetty</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>maven-jetty-plugin</artifactId>
                        <version>${jetty-version}</version>
                        <configuration>
                            <scanIntervalSeconds>10</scanIntervalSeconds>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>javax.el</groupId>
                    <artifactId>el-api</artifactId>
                    <version>2.2</version>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>org.glassfish.web</groupId>
                    <artifactId>el-impl</artifactId>
                    <scope>runtime</scope>
                    <version>2.2</version>
                </dependency>
            </dependencies>
        </profile>
    </profiles
}}}

== Tomcat preparation ==

Tomcat6 has to be prepared, otherwise it will crash with a Exception on container startup:

1. go to the tomcat home directory

2. remove tomcats el-api.jar from the classpath:
    $> mv ./lib/el-api.jar ./lib/el-api.jar.nixda

3. copy the EL-2.2 jars into ./lib (el-api-2.2.jar, el-impl-2.2.jar)

4. make sure that the applications don't contain those 2 el jars!