Download
Java Version Date Version Binary Source Comments
Java 2
only
5/8/2006 2.6.9 Download 2.6.9 binary Download 2.6.9 source
Download 2.6.9 documentation

Release Notes:

  • Updated build and project to OpenSymphony. License has changed, as well as project organization
  • Added Eclipse project files
  • OgnlContext.java: Added try...catch around System.getProperty() access for limited security environments.
  • OgnlRuntime.java: Added security manager API enhancements to OgnlRuntime (requested by Ciber).
  • OgnlOps.java: Fixed bug in compareWithConversion() where non-numeric non-Comparable objects throw invalid comparison exception.
  • Various cleanups of code formatting
8/14/2004 2.6.7 Download 2.6.7 binary Download 2.6.7 source
Download 2.6.7 documentation

SimpleNode.java
Fixed bug where current object is not set during navigation if that object is null.

8/8/2004 3.0.0-pre-2

Download 3.0.0 Preview 2 binary

Download 3.0.0 Preview 2 source

This is a developer preview release and comes in source and binary form.

The intent is to gather feedback on the new direction of the OGNL API. The language is not changed, but the internals of OGNL have changed dramatically.

Please take a look at this and provide feedback via the OGNL lists.

Bugs fixed for this release parallel the 2.6.6 release.

8/8/2004 2.6.6 Download 2.6.6 binary Download 2.6.6 source
Download 2.6.6 documentation

ArrayPropertyAccessor.java
Fixed bug with not calling conversion on setting value in array

NoSuchPropertyException.java
Made message clearer about which object is being accessed

OgnlOps.java
Added compareWithConversion() method used by relational operators for comparisons.

Tests

  • Added new ArithmeticAndLogicalOperatorsTest test case
  • Added new ArrayElementsTest test cases to test conversion when setting array values
4/2/2004 3.0.0-pre-1   Download 3.0.0 Preview 1 source

This is a developer preview release and only comes in source form.

The intent is to gather feedback on the new direction of the OGNL API. The language is not changed, but the internals of OGNL have changed dramatically.

Please take a look at this and provide feedback via the OGNL lists.

4/2/2004 2.6.5 Download 2.6.5 binary Download 2.6.5 source
Download 2.6.5 documentation
Release Notes
  • Fixed several NullPointerException points
  • Fixed greater than operator for Comparable objects
  • Fixed static method calls on instance
  • Added isEqual() method to OgnlOps for more robust equality check than object's equals() method
  • Added 3 new test cases (operators, nested properties within method calls, NoSuchPropertyException handling)
  • Added 4 new tests to existing test cases for static method calls
3/21/2004 2.6.4 Download 2.6.4 binary Download 2.6.4 source
Download 2.6.4 documentation
Release Notes
  • Fixed root & this keywords not working
  • Added constant value folding for expression evaluation
  • Improved String -> Number handling
  • bigIntValue(), bigDecValue(), longValue() and doubleValue() now declare to throw NumberFormatException.
  • Removed deadlock from SimpleNode on evaluation pool.
  • Added default primitive values for setting and getting null results on methods that return primitives.
  • TypeConverter result value of NoConversionPossible now returnable for TypeConverter implementations where (suprisingly enough) no conversion is possible
  • Tests include an experimental Javassist-based compiler for faster property expression handling (compiles a property accessor to bytecode).
  • Converted all tests to JUnit
  • Split documentation into Language Guide and Developer Guide
  • Build file now self-contained
  • Distributions of source and documentation are now zip files instead of jar files
8/15/2003 2.6.3 Download build-ext.xml
Download build-ext.properties

Build file that will work for OGNL 2.6.3 external builds.

  1. Download build-ext.xml and build-ext.properties into the OGNL source directory
  2. Download copies of ant-contrib-x.x.jar and javacc.jar.
  3. Edit build-ext.properties to point to the downloaded jars from (2)
  4. Build OGNL using the build-ext.xml file:

          ant -f build-ext.xml

    This will build the ognl-2.6.3.jar into the current working directory
  5. Enjoy your newly built OGNL jar!
8/1/2003 2.6.3 Download 2.6.3 binary Download 2.6.3 source
Download 2.6.3 documentation

Bug fix release:

  • Fixed bug with Object Indexed properties wherein you could not override the get or set methods.
  • Corrected OgnlOps operations with regard to String catenation and null handling. If two strings are being catenated with the "+" operator and one of them is null this will now use "null" (literal string) as a replacement. This is consistent with Java's handling of null catenation to a String. Any other object catenated to a null object will throw a NullPointerException as usual.
7/29/2003 2.6.2 Download 2.6.2 binary Download 2.6.2 source
Download 2.6.2 documentation

Wow, a release 2 hours after a previous release.

  • Fixed bug with finding Object Indexed properties that were of the form get(Object) and set(Object, Object). This was triggered by an expression on java.lang.reflect.Field, the only JDK class to implement this pattern.
7/28/2003 2.6.1 Download 2.6.1 binary Download 2.6.1 source
Download 2.6.1 documentation

This release adds some interesting features that will make OGNL more compatible with embedding in XML, as well as some bug fixes.

  • Aliased all logical and relational operators with plain text equivalents (see OGNL Reference for a complete guide to the new operators). This should make embedding OGNL in XML attributes and text much easier (no more CDATA sections!).
  • Fixed bug with Object Indexing which caused the indexing code to always check the type of the root of the expression rather than the currently set #this object.
  • Changed NullHandler and MethodHandler to take an Object[] (like ExtendedMethodHandler and ExtendedNullHandler used to). Updated ObjectNullHandler and ObjectMethodAccessor appropriately.
  • Added new create() methods to ObjectArrayPool for creating object arrays initialized with a variety of different sizes.
  • Removed ExtendedNullHandler and ExtendedMethodAccessor, which were not very useful anyway.
  • As always, added many new tests to test new and improved functionality.
  • Updated the documentation to include mentioning the use of single quotes in strings, removed reference to Strings and null handling (Strings are handled exactly like other Object) and also a new section on the wide variety of indexing options that OGNL supports.
6/22/2003 2.6.0 Download 2.6.0 binary Download 2.6.0 source
Download 2.6.0 documentation
See Release Notes. This is a big release.
4/15/2003 2.5.1 Download 2.5.1 binary Download 2.5.1 source
Download 2.5.1 documentation

Fixed NullPointerException in ArrayPropertyAccessor when expression starts with array reference (i.e. "[0]").

4/14/2003 2.5.0 Download 2.5.0 binary Download 2.5.0 source
Download 2.5.0 documentation

Added indexed property support. As a result of this I also added Evaluation tracing.

See ognl.OgnlContext API and ognl.Evaluation API for usage of Evaluation class.

3/19/2003 2.4.2 Download 2.4.2 binary Download 2.4.2 source
Download 2.4.2 documentation

Removed specific dependency on LinkedHashMap that prevented OGNL versions 2.2.2 and later from being used on JDK 1.3.1 VMs.

2/28/2003 2.4.1 Download 2.4.1 binary Download 2.4.1 source
Download 2.4.1 documentation

Fixed bug dealing with calling methods on Class (like object.getClass().getName()).

Added 4 new tests to support this bug fix.

Changed the way PDF documentation is generated and don't distribute the temporary FOP code with the doc bundle (build file changes).

2/26/2003 2.4.0 Download 2.4.0 binary Download 2.4.0 source
Download 2.4.0 documentation
This release adds some new API. These features are somewhat experimental as their usage has not yet been proven.
  • MethodAccessor interface for choosing methods class-by-class and executing them. Blame and congratulate Patrick Lightbody and his constant pestering for this one.
  • NullHandler interface for handling how nulls are navigated (allows for substitution of null value with non-null for recovery). Amazingly enough this suggestion also came from Patrick Lightbody.
Note: This release is the first to exclude the optimized binary from the distribution. I haven't seen an advantage in this release except for it's slightly smaller size. If you want an optimized version the source's build file allows for an optimized build by specifying -Djavac.optimize=true -Djavac.debug=false on the build command line.
1/28/2003 2.3.7 Download 2.3.7 binary
Download 2.3.7 optimized binary  
Download 2.3.7 source
Download 2.3.7 documentation
Added toString() functionality to the AST so that it will reproduce the original expression.
Also did a little performance optimization (minor).
1/15/2003 2.3.6 Download 2.3.6 binary
Download 2.3.6 optimized binary  
Download 2.3.6 source
Download 2.3.6 documentation
Fixed performance bug in getDeclaredMethods() due to bad caching strategy.
New DocBook documentation! Check out guide/UsersGuide.html!
1/12/2003 2.3.5 Download 2.3.5 binary
Download 2.3.5 optimized binary  
Download 2.3.5 source
Download 2.3.5 javadoc
Added additional string quoting options:
  • Single quotes (') with a length of one will be turned into a Character (for compatibility with current expressions)
  • Single quotes of length greater than one will be turned into String (so that OGNL expressions can be safely embedded in XML attributes, for example).
  • Double quotes (") are exclusively for String
  • new back quotes (`) are exclusively for Character and must be one character long.
1/10/2003 2.3.4 Download 2.3.4 binary
Download 2.3.4 optimized binary  
Download 2.3.4 source
Download 2.3.4 javadoc
Fixed bug in private member access in OgnlRuntime. Thanks to Joseph Panico for catching this.
12/19/2002 2.3.3 Download 2.3.3 binary
Download 2.3.3 optimized binary  
Download 2.3.3 source
Download 2.3.3 javadoc
Fixed a performance bug with gettting declared methods related to accessing private and protected members
12/10/2002 2.3.2 Download 2.3.2 binary
Download 2.3.2 optimized binary  
Download 2.3.2 source
Download 2.3.2 javadoc
  • PropertyNode tracking fixed (used internally by MapPropertyAccessor)
  • Fixed private/protected/package protected access for properties and methods
  • Used PMD to clean up code (unused imports & local variables). Recommended.
  • Added 9 tests for private access stuff.
11/6/2002 2.3.1 Download 2.3.1 binary
Download 2.3.1 optimized binary  
Download 2.3.1 source
Download 2.3.1 javadoc

Security added for method invocation. To use you need to add entries for ognl.OgnlInvokePermission with a pattern that matches the methods you want to be able to call like "invoke.class-name.method-name". Example in Tomcat, permitting access to the org.ognl and the javax.mail packages:

grant codeBase "file:${catalina.home}/webapps/OGNL/-"

{

    permission ognl.OgnlInvokePermission "invoke.org.ognl.*";

    permission ognl.OgnlInvokePermission "invoke.javax.mail.*";

    ...more entries follow...

}
11/5/2002 2.3.0 Download 2.3.0 binary
Download 2.3.0 optimized binary  
Download 2.3.0 source
Download 2.3.0 javadoc
Lots of improvements and additions:
  • Added new API for calling TypeConverter on result of getValue()
  • Added new search operators on list:
    • <list>.{^ <expr> } returns either a list containing the first item in the <list> that matches <expr> or an empty list
    • <list>.{$ <expr> } returns either a list containing the last item in the <list> that matches <expr> or an empty list.
  • Added new collections support for Map, List, Set, Iterator and Enumeration that allow getting common methods as properties instead of having to make method calls. The following methods are implemented:
    • Collection (Map, List, Set all implement these):
      • size - returns the size of the collection
      • isEmpty - returns true if collection is empty
    • List
      • iterator - returns an Iterator of the elements
    • Map
      • keys - returns Set of keys
      • values - returns Collection of values
    • Set
      • iterator - returns an Iterator of the elements
    • Iterator
      • next - returns next element of iteration
      • hasNext - returns true if there is a next element in the iteration
    • Enumeration
      • nextElement - synonym for next
      • next - see Iterator.next
      • hasMoreElements - synonym for hasNext
      • hasNext - see Iterator.hasNext
  • Added new class, OgnlContext, to replace Maps as contexts. Public API remains the same but internally all methods take OgnlContext instead of Map.
  • 1.8x Performance improvement
10/20/2002 2.2.2 Download 2.2.2 binary
Download 2.2.2 optimized binary  
Download 2.2.2 source
Download 2.2.2 javadoc

Added Map creation syntax:
#{ "foo":"bar" } will yield a java.util.HashMap with one key/value pair, "foo"->"bar". You can specify the type of map to create by inserting a class reference between the # and {, thusly:
#@java.util.LinkedHashMap@{"foo":"bar", "bar":"baz"}

10/11/2002 2.2.1 Download 2.2.1 binary
Download 2.2.1 optimized binary  
Download 2.2.1 source
Download 2.2.1 javadoc
Fixed and enhanced array support. Now supports primitive type arrays and also correctly calls the TypeConverter for the context when creating arrays.
10/10/2002 2.2.0 Download 2.2.0 binary
Download 2.2.0 optimized binary  
Download 2.2.0 source
Download 2.2.0 javadoc
Fixed bug in handling MethodFailedException to report correct owning class. Thanks to Brian Johnson for this fix.
Also added Java array support - i.e. new String[] { "foo", "bar"} and new String[5]. I have to wonder why I didn't do this before :-)
9/28/2002 2.1.4 Download 2.1.4 binary
Download 2.1.4 optimized binary  
Download 2.1.4 source
Download 2.1.4 javadoc
Fixed bug in handling arrays. Thanks to Tom Drake for this fix.
9/19/2002 2.1.3 Download 2.1.3 binary
Download 2.1.3 optimized binary  
Download 2.1.3 source
Download 2.1.3 javadoc
Added methods to Ognl class for syntax analysis: isConstant(), isSimpleProperty(), and isSimpleNavigationChain() to better optimize use of OGNL expressions.
7/20/2002 2.1.2 Download 2.1.2 binary
Download 2.1.2 optimized binary  
Download 2.1.2 source
Download 2.1.2 javadoc
Fixed a bug with type conversion that prevented calling overloaded methods with different parameter counts. Also added JavaDoc to the build process.
7/10/2002 2.1.1 Download 2.1.1 binary
Download 2.1.1 optimized binary  
Download 2.1.1 source  Modified the MemberAccessManager interface to be MemberAccess. Also changed the MemberAccessSetup class to DefaultMemberAccess and allowed changing this on a per-context basis, like ClassResolver and TypeConverter. The interface to MemberAccess now is much richer so that you can get the property name and target as well as the member on which access is to be modified.
7/3/2002 2.1.0 Download 2.1.0 binary
Download 2.1.0 optimized binary  
Download 2.1.0 source  Added TypeConverter interface for doing conversion between types for all methods, constructors and fields. Type conversion is handled on a per-context basis. Default type converter converts automatically among numeric types an also from numeric to String and String back to numeric.
Refactored some of the code in OgnlRuntime.java to be more consistent with the rest of the API.
Added about 50 new tests for type conversion.
6/25/2002 2.0.3 Download 2.0.3 binary
Download 2.0.3 optimized binary
Download 2.0.3 source  Restructured the build directory, also changed the headers to reflect the new Modern BSD licensing. There is also a version built with optimization on and debug symbols off so that the jar is much smaller (77K vs. 104K).
3/31/2002 2.0.2 Download 2.0.2 binary  Download 2.0.2 source  Fixed bug related to subexpressions within array indexes (i.e. aList[somethingElse.index] did not properly extract somethingElse from the root property; rather it tried to get the somethingElse property from the aList list). Also fixed PropertyAccessor and ElementAccessor bug for not looking more than one level deep into interfaces for conforming accessors (so a class that implemented a sub-interface of Map would get the ObjectPropertyAccessor instead of the correct MapPropertyAccessor). Many thanks to Brian Johnson at Mongoose Technologies for spotting this!
10/14/2001 2.0.1 Download 2.0.1 binary  Download 2.0.1 source  Ant build.xml file replaces GNUMakefile for building. Requires ANT and JavaCC distributions. New Test.java adds 5 new tests.
10/13/2001 2.0.0 Download 2.0.0 binary  Download 2.0.0 source  Removed dependence on ANTLR; now uses JavaCC for parser engine. Also changed Hashtables for context to Map. This is a preliminary version and only rudimentary testing has been done. The Makefile, in particular, is not up to date. We are in the process of moving to Ant for building. This will be available in the next dot release.
Java 1
and
Java 2
versions
available
7/21/2001 1.0.4 Download for Java2
Download for Java1
Download for Java2
Download for Java1
Huge speed improvements!
11/15/2000 1.0.3 Download for Java2
Download for Java1
Download for Java2
Download for Java1
Added ClassResolver interface called for @@, instanceof and new.
10/12/2000 1.0.2 Download Download Pure Java2 version, uses Java 2 collections internally.
10/12/2000 1.0.1 Download Download Updated some minor lexer error reporting that might print stuff to the error console in certain circumstances.
9/26/2000 1.0.0 Download Download First version released!

Note for 2.0.0 and above:

Versions of OGNL for 2.0.0 and above are now free of outside dependencies (like ANTLR)! This means that the runtime jar is smaller (77K [optimized, 104K debug] now compared to 440K for OGNL + ANTLR before) and you don't have to be dependent on a particular version of ANTLR.

The use of Hashtables for the OGNL context has now changed to a Map. This should cause some minor inconvenience if you are using contexts directly but it should just be a matter of changing a class name in your code. This change should make OGNL more efficient because Hashtables are rife with synchronized access, whereas Maps are not. This also makes it difficult to port back to Java 1.1, unfortunately, but not impossible.

OGNL 2.0.0 is only available for Java2. No effort will be made to back-port this to Java 1, although it is still possible to do so.

This port made possible by the tireless efforts of Luke Blanshard, co-author of OGNL and all-around great guy!

The OGNL 2.0.0 versions require Ant 1.4.1 and JavaCC 2.1 to build (but not to run). You can find JavaCC at the WebGain home and Ant at the Jakarta Project Ant Home.

Note for 1.0.4 and prior versions:

Versions of OGNL for Java 1.1 require that the ANTLR parser generator and the Java 1.1 Collections package be present (even for Java 2 usage since OGNL for Java 1.1 uses the 1.1 collections package internally for compatibility). Versions built specifically for Java 2 do not have this requirement since it uses the Java2 collections package (java.util.*) internally.

You can find ANLTR at http://www.antlr.org or download the 2.6.0 version (which is the latest compatible version for use with OGNL) as a binary or as source.

You can find the Java 1.1 Collections package at the InfoBus page at http://java.sun.com/products/javabeans/infobus or download the binary here.