[[EL-EL]]
EL
~~

Camel supports the unified JSP and JSF Expression Language via the
http://juel.sourceforge.net/[JUEL] to allow an
link:expression.html[Expression] or link:predicate.html[Predicate] to be
used in the link:dsl.html[DSL] or link:xml-configuration.html[Xml
Configuration].

For example you could use EL inside a link:message-filter.html[Message
Filter] in XML

[source,xml]
---------------------------------------
<route>
  <from uri="seda:foo"/>
  <filter>
    <el>${in.headers.foo == 'bar'}</el>
    <to uri="seda:bar"/>
  </filter>
</route>
---------------------------------------

You could also use slightly different syntax, e.g. if the header name is
not a valid identifier:

[source,xml]
------------------------------------------------
<route>
  <from uri="seda:foo"/>
  <filter>
    <el>${in.headers['My Header'] == 'bar'}</el>
    <to uri="seda:bar"/>
  </filter>
</route>
------------------------------------------------

You could use EL to create an link:predicate.html[Predicate] in a
link:message-filter.html[Message Filter] or as an
link:expression.html[Expression] for a
link:recipient-list.html[Recipient List]

[[EL-Options]]
EL Options
^^^^^^^^^^



// language options: START
The EL language supports 1 options which are listed below.



{% raw %}
[width="100%",cols="2,1m,1m,6",options="header"]
|=======================================================================
| Name | Default | Java Type | Description
| trim | true | Boolean | Whether to trim the value to remove leading and trailing whitespaces and line breaks
|=======================================================================
{% endraw %}
// language options: END



[[EL-Variables]]
Variables
^^^^^^^^^

[width="100%",cols="10%,10%,80%",options="header",]
|=======================================================================
|Variable |Type |Description

|exchange |Exchange |the Exchange object

|in |Message |the exchange.in message

|out |Message |the exchange.out message
|=======================================================================

[[EL-Samples]]
Samples
^^^^^^^

You can use EL dot notation to invoke operations. If you for instance
have a body that contains a POJO that has a `getFamiliyName` method then
you can construct the syntax as follows:

[source,java]
-----------------------
"${in.body.familyName}"
-----------------------

[[EL-Dependencies]]
Dependencies
^^^^^^^^^^^^

To use EL in your camel routes you need to add the a dependency on
*camel-juel* which implements the EL language.

If you use maven you could just add the following to your pom.xml,
substituting the version number for the latest & greatest release (see
link:download.html[the download page for the latest versions]).

[source,java]
-------------------------------------
<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-juel</artifactId>
  <version>x.x.x</version>
</dependency>
-------------------------------------

Otherwise you'll also need to include
http://repo2.maven.org/maven2/de/odysseus/juel/juel/2.1.3/juel-2.1.3.jar[JUEL].
