*/
private static ExpressionParser createDefaultExpressionParser(ConversionService conversionService)
throws IllegalStateException {
try {
ExpressionFactory elFactory = DefaultExpressionFactoryUtils.createExpressionFactory();
WebFlowELExpressionParser expressionParser = new WebFlowELExpressionParser(elFactory);
if (conversionService != null) {
expressionParser.setConversionService(conversionService);
}
return expressionParser;
} catch (Exception e) {
try {
ClassUtils.forName("ognl.Ognl", DefaultExpressionParserFactory.class.getClassLoader());
WebFlowOgnlExpressionParser expressionParser = new WebFlowOgnlExpressionParser();
if (conversionService != null) {
expressionParser.setConversionService(conversionService);
}
return expressionParser;
} catch (ClassNotFoundException ex) {
IllegalStateException ise = new IllegalStateException(
"Unable to create the default expression parser for Spring Web Flow: Neither a Unified EL implementation or OGNL could be found.");