struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From musa...@apache.org
Subject svn commit: r819444 [1/27] - in /struts/struts2/trunk/plugins/embeddedjsp: ./ src/main/java/org/apache/struts2/el/ src/main/java/org/apache/struts2/el/lang/ src/main/java/org/apache/struts2/el/parser/ src/main/java/org/apache/struts2/el/util/ src/main/...
Date Mon, 28 Sep 2009 01:55:35 GMT
Author: musachy
Date: Mon Sep 28 01:55:26 2009
New Revision: 819444

URL: http://svn.apache.org/viewvc?rev=819444&view=rev
Log:
Update to Jasper 6.0.20

Added:
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ExpressionFactoryImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/Messages.properties
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/Messages_es.properties
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/MethodExpressionImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/MethodExpressionLiteral.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ValueExpressionImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ValueExpressionLiteral.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/ELArithmetic.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/ELSupport.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/EvaluationContext.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/ExpressionBuilder.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/FunctionMapperFactory.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/FunctionMapperImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/VariableMapperFactory.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/VariableMapperImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ArithmeticNode.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstAnd.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstBracketSuffix.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstChoice.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstCompositeExpression.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstDeferredExpression.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstDiv.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstDotSuffix.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstDynamicExpression.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstEmpty.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstEqual.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstFalse.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstFloatingPoint.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstFunction.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstGreaterThan.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstGreaterThanEqual.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstIdentifier.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstInteger.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstLessThan.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstLessThanEqual.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstLiteralExpression.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstMinus.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstMod.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstMult.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstNegative.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstNot.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstNotEqual.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstNull.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstOr.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstPlus.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstString.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstTrue.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/AstValue.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/BooleanNode.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParser.html
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParser.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParser.jjt
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParserConstants.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParserTokenManager.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParserTreeConstants.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/JJTELParserState.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/Node.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/NodeVisitor.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ParseException.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/SimpleCharStream.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/SimpleNode.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/Token.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/TokenMgrError.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/util/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/util/ConcurrentCache.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/util/MessageFactory.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/util/ReflectionUtil.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/Constants.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/CustomCompiler.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/EmbeddedServletOptions.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/JasperException.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/JspC.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/JspCompilationContext.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/Options.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/BeanRepository.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Collector.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Compiler.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/DefaultErrorHandler.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Dumper.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ELFunctionMapper.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ELNode.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ELParser.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ErrorDispatcher.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ErrorHandler.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Generator.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ImplicitTagLibraryInfo.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JasperTagInfo.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JavacErrorDetail.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspConfig.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspDocumentParser.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspReader.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspRuntimeContext.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspUtil.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Localizer.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Mark.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Node.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/PageDataImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/PageInfo.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Parser.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ParserController.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ScriptingVariabler.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ServletWriter.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/SmapGenerator.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/SmapStratum.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/SmapUtil.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/TagConstants.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/TagFileProcessor.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/TagLibraryInfoImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/TagPluginManager.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/TextOptimizer.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/TldLocationsCache.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/tagplugin/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/tagplugin/TagPlugin.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/tagplugin/TagPluginContext.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/ELContextImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/ELContextWrapper.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/ELResolverImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/ExpressionEvaluatorImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/ExpressionImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/FunctionMapperImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/JspELException.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/JspMethodExpression.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/JspMethodNotFoundException.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/JspPropertyNotFoundException.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/JspPropertyNotWritableException.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/JspValueExpression.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/el/VariableResolverImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/AnnotationHelper.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/BodyContentImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/HttpJspBase.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/JspApplicationContextImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/JspContextWrapper.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/JspFactoryImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/JspFragmentHelper.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/JspRuntimeLibrary.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/JspSourceDependent.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/JspWriterImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/PageContextImpl.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/PerThreadTagHandlerPool.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/ProtectedFunctionMapper.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/ServletResponseWrapperInclude.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/TagHandlerPool.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/security/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/security/SecurityClassLoad.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/security/SecurityUtil.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/servlet/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/servlet/JasperLoader.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/servlet/JspCServletContext.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/servlet/JspServlet.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/servlet/JspServletWrapper.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/servlet/mbeans-descriptors.xml
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/Util.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/Catch.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/Choose.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/ForEach.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/ForTokens.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/If.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/Import.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/Otherwise.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/Out.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/Param.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/Redirect.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/Remove.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/Set.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/Url.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/core/When.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/tagplugins/jstl/tagPlugins.xml
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/util/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/util/Enumerator.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/ASCIIReader.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/EncodingMap.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/ParserUtils.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/SymbolTable.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/TreeNode.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/UCSReader.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/UTF8Reader.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/XMLChar.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/XMLEncodingDetector.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/XMLString.java
    struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/XMLStringBuffer.java
Modified:
    struts/struts2/trunk/plugins/embeddedjsp/pom.xml

Modified: struts/struts2/trunk/plugins/embeddedjsp/pom.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/embeddedjsp/pom.xml?rev=819444&r1=819443&r2=819444&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/embeddedjsp/pom.xml (original)
+++ struts/struts2/trunk/plugins/embeddedjsp/pom.xml Mon Sep 28 01:55:26 2009
@@ -60,12 +60,6 @@
             <artifactId>spring-core</artifactId>
             <version>2.5.6</version>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>commons-logging</groupId>
-                    <artifactId>commons-logging</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.easymock</groupId>
@@ -80,17 +74,23 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>javax.servlet.jsp</groupId>
+            <artifactId>jsp-api</artifactId>
+            <version>2.1</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>juli</artifactId>
+            <version>6.0.18</version>
+        </dependency>
+        <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>servlet-api</artifactId>
             <version>2.4</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>commons-el</groupId>
-            <artifactId>commons-el</artifactId>
-            <version>1.0</version>
-        </dependency>
-        <dependency>
             <groupId>taglibs</groupId>
             <artifactId>standard</artifactId>
             <version>1.1.2</version>
@@ -102,6 +102,12 @@
             <version>1.1.2</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>jasper</artifactId>
+            <version>6.0.18</version>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
 
     <build>

Added: struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ExpressionFactoryImpl.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ExpressionFactoryImpl.java?rev=819444&view=auto
==============================================================================
--- struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ExpressionFactoryImpl.java (added)
+++ struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ExpressionFactoryImpl.java Mon Sep 28 01:55:26 2009
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.struts2.el;
+
+import javax.el.ELContext;
+import javax.el.ExpressionFactory;
+import javax.el.MethodExpression;
+import javax.el.ValueExpression;
+
+import org.apache.struts2.el.lang.ELSupport;
+import org.apache.struts2.el.lang.ExpressionBuilder;
+import org.apache.struts2.el.util.MessageFactory;
+
+
+/**
+ * @see javax.el.ExpressionFactory
+ * 
+ * @author Jacob Hookom [jacob@hookom.net]
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: markt $
+ */
+public class ExpressionFactoryImpl extends ExpressionFactory {
+
+    /**
+     * 
+     */
+    public ExpressionFactoryImpl() {
+        super();
+    }
+
+    public Object coerceToType(Object obj, Class type) {
+        return ELSupport.coerceToType(obj, type);
+    }
+
+    public MethodExpression createMethodExpression(ELContext context,
+            String expression, Class<?> expectedReturnType,
+            Class<?>[] expectedParamTypes) {
+        if (expectedParamTypes == null) {
+            throw new NullPointerException(MessageFactory
+                    .get("error.method.nullParms"));
+        }
+        ExpressionBuilder builder = new ExpressionBuilder(expression, context);
+        return builder.createMethodExpression(expectedReturnType,
+                expectedParamTypes);
+    }
+
+    public ValueExpression createValueExpression(ELContext context,
+            String expression, Class expectedType) {
+        if (expectedType == null) {
+            throw new NullPointerException(MessageFactory
+                    .get("error.value.expectedType"));
+        }
+        ExpressionBuilder builder = new ExpressionBuilder(expression, context);
+        return builder.createValueExpression(expectedType);
+    }
+
+    public ValueExpression createValueExpression(Object instance,
+            Class expectedType) {
+        if (expectedType == null) {
+            throw new NullPointerException(MessageFactory
+                    .get("error.value.expectedType"));
+        }
+        return new ValueExpressionLiteral(instance, expectedType);
+    }
+}

Added: struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/Messages.properties
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/Messages.properties?rev=819444&view=auto
==============================================================================
--- struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/Messages.properties (added)
+++ struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/Messages.properties Mon Sep 28 01:55:26 2009
@@ -0,0 +1,63 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# General Errors
+error.convert=Cannot convert {0} of type {1} to {2}
+error.compare=Cannot compare {0} to {1}
+error.function=Problems calling function ''{0}''
+error.unreachable.base=Target Unreachable, identifier ''{0}'' resolved to null
+error.unreachable.property=Target Unreachable, ''{0}'' returned null
+error.resolver.unhandled=ELResolver did not handle type: {0} with property of ''{1}''
+error.resolver.unhandled.null=ELResolver cannot handle a null base Object with identifier ''{0}''
+
+# ValueExpressionLiteral
+error.value.literal.write=ValueExpression is a literal and not writable: {0}
+
+# ExpressionFactoryImpl
+error.null=Expression cannot be null
+error.mixed=Expression cannot contain both '#{..}' and '${..}' : {0}
+error.method=Not a valid MethodExpression : {0}
+error.method.nullParms=Parameter types cannot be null
+error.value.expectedType=Expected type cannot be null
+
+# ExpressionMediator
+error.eval=Error Evaluating {0} : {1}
+
+# ValueSetVisitor
+error.syntax.set=Illegal Syntax for Set Operation
+
+# ReflectionUtil
+error.method.notfound=Method not found: {0}.{1}({2})
+error.property.notfound=Property ''{1}'' not found on {0}
+
+# ValidatingVisitor
+error.fnMapper.null=Expression uses functions, but no FunctionMapper was provided
+error.fnMapper.method=Function ''{0}'' not found
+error.fnMapper.paramcount=Function ''{0}'' specifies {1} params, but {2} were declared
+
+# **ExpressionImpl
+error.context.null=ELContext was null
+
+# ArrayELResolver
+error.array.outofbounds=Index {0} is out of bounds for array of size {1}
+
+# ListELResolver
+error.list.outofbounds=Index {0} is out of bounds for list of size {1}
+
+# BeanELResolver
+error.property.notfound=Property ''{1}'' not found on type: {0}
+error.property.invocation=Property ''{1}'' threw an exception from type: {0}
+error.property.notreadable=Property ''{1}'' doesn't have a 'get' specified on type: {0}
+error.property.notwritable=Property ''{1}'' doesn't have a 'set' specified on type: {0}
\ No newline at end of file

Added: struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/Messages_es.properties
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/Messages_es.properties?rev=819444&view=auto
==============================================================================
--- struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/Messages_es.properties (added)
+++ struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/Messages_es.properties Mon Sep 28 01:55:26 2009
@@ -0,0 +1,42 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+error.convert = No puedo convertir {0} desde tipo {1} a {2}
+error.compare = No puedo comparar {0} con {1}
+error.function = Problemas llamando a funci\u00F3n ''{0}''
+error.unreachable.base = Objetivo inalcanzable, identificador ''{0}'' resuelto a nulo
+error.unreachable.property = Objetivo inalcanzable, ''{0}'' devolvi\u00F3 nulo
+error.resolver.unhandled = ELResolver no manej\u00F3 el tipo\: {0} con propiedad de ''{1}''
+error.resolver.unhandled.null = ELResolver no puede manejar un Objeto base nulo  con identificador de ''{0}''
+error.value.literal.write = ValueExpression es un literal y no un grabable\: {0}
+error.null = La expresi\u00F3n no puede ser nula
+error.mixed = La expresi\u00F3n no puede contenera la vez '\#{..}' y '${..}' \: {0}
+error.method = No es una MethodExpression v\u00E1lida\: {0}
+error.method.nullParms = Los tipos de par\u00E1metro no pueden ser nulo
+error.value.expectedType = El tipo esperado no puede ser nulo
+error.eval = Error Evaluando {0} \: {1}
+error.syntax.set = Sit\u00E1xis ilegal para Operaci\u00F3n de Poner Valor
+error.method.notfound = M\u00E9todo no hallado\: {0}.{1}({2})
+error.property.notfound = Propiedad ''{1}'' no hallada en {0}
+error.fnMapper.null = La expresi\u00F3n usa funciones, pero no se ha suministrado FunctionMapper
+error.fnMapper.method = Funci\u00F3n "{0}" no hallada
+error.fnMapper.paramcount = La funci\u00F3n ''{0}'' especifica {1} par\u00E9metros, pero {2} fueron declarados
+error.context.null = ELContext era nulo
+error.array.outofbounds = \u00CDndice {0} fuera de l\u00EDmites para arreglo de medida {1}
+error.list.outofbounds = \u00CDndice {0} fuera de l\u00EDmites para lista de medida {1}
+error.property.notfound = Propiedad ''{1}'' no hallada en tipo\: {0}
+error.property.invocation = Propiedad ''{1}'' lanz\u00F3 una excepci\u00F3n desde tipo\: {0}
+error.property.notreadable = La propiedad ''{1}'' no tiene un 'get' especificado en el tipo\: {0}
+error.property.notwritable = La propiedad ''{1}'' no tiene un 'set' especificado en el tipo\: {0}

Added: struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/MethodExpressionImpl.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/MethodExpressionImpl.java?rev=819444&view=auto
==============================================================================
--- struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/MethodExpressionImpl.java (added)
+++ struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/MethodExpressionImpl.java Mon Sep 28 01:55:26 2009
@@ -0,0 +1,314 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.struts2.el;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.ELResolver;
+import javax.el.Expression;
+import javax.el.ExpressionFactory;
+import javax.el.FunctionMapper;
+import javax.el.MethodExpression;
+import javax.el.MethodInfo;
+import javax.el.MethodNotFoundException;
+import javax.el.PropertyNotFoundException;
+import javax.el.VariableMapper;
+
+import org.apache.struts2.el.lang.EvaluationContext;
+import org.apache.struts2.el.lang.ExpressionBuilder;
+import org.apache.struts2.el.parser.Node;
+import org.apache.struts2.el.util.ReflectionUtil;
+
+
+/**
+ * An <code>Expression</code> that refers to a method on an object.
+ * 
+ * <p>
+ * <code>The {@link ExpressionFactory#createMethodExpression} method
+ * can be used to parse an expression string and return a concrete instance
+ * of <code>MethodExpression</code> that encapsulates the parsed expression.
+ * The {@link FunctionMapper} is used at parse time, not evaluation time, 
+ * so one is not needed to evaluate an expression using this class.  
+ * However, the {@link ELContext} is needed at evaluation time.</p>
+ *
+ * <p>The {@link #getMethodInfo} and {@link #invoke} methods will evaluate the 
+ * expression each time they are called. The {@link ELResolver} in the 
+ * <code>ELContext</code> is used to resolve the top-level variables and to 
+ * determine the behavior of the <code>.</code> and <code>[]</code> 
+ * operators. For any of the two methods, the {@link ELResolver#getValue} 
+ * method is used to resolve all properties up to but excluding the last 
+ * one. This provides the <code>base</code> object on which the method
+ * appears. If the <code>base</code> object is null, a 
+ * <code>NullPointerException</code> must be thrown. At the last resolution, 
+ * the final <code>property</code> is then coerced to a <code>String</code>,
+ * which provides the name of the method to be found. A method matching the 
+ * name and expected parameters provided at parse time is found and it is 
+ * either queried or invoked (depending on the method called on this
+ * <code>MethodExpression</code>).</p>
+ *
+ * <p>See the notes about comparison, serialization and immutability in 
+ * the {@link Expression} javadocs.
+ *
+ * @see javax.el.ELResolver
+ * @see javax.el.Expression
+ * @see javax.el.ExpressionFactory
+ * @see javax.el.MethodExpression
+ * 
+ * @author Jacob Hookom [jacob@hookom.net]
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: markt $
+ */
+public final class MethodExpressionImpl extends MethodExpression implements
+        Externalizable {
+
+    private Class expectedType;
+
+    private String expr;
+
+    private FunctionMapper fnMapper;
+
+    private VariableMapper varMapper;
+
+    private transient Node node;
+
+    private Class[] paramTypes;
+
+    /**
+     * 
+     */
+    public MethodExpressionImpl() {
+        super();
+    }
+
+    /**
+     * @param expr
+     * @param node
+     * @param fnMapper
+     * @param expectedType
+     * @param paramTypes
+     */
+    public MethodExpressionImpl(String expr, Node node,
+            FunctionMapper fnMapper, VariableMapper varMapper,
+            Class expectedType, Class[] paramTypes) {
+        super();
+        this.expr = expr;
+        this.node = node;
+        this.fnMapper = fnMapper;
+        this.varMapper = varMapper;
+        this.expectedType = expectedType;
+        this.paramTypes = paramTypes;
+    }
+
+    /**
+     * Determines whether the specified object is equal to this
+     * <code>Expression</code>.
+     * 
+     * <p>
+     * The result is <code>true</code> if and only if the argument is not
+     * <code>null</code>, is an <code>Expression</code> object that is the
+     * of the same type (<code>ValueExpression</code> or
+     * <code>MethodExpression</code>), and has an identical parsed
+     * representation.
+     * </p>
+     * 
+     * <p>
+     * Note that two expressions can be equal if their expression Strings are
+     * different. For example, <code>${fn1:foo()}</code> and
+     * <code>${fn2:foo()}</code> are equal if their corresponding
+     * <code>FunctionMapper</code>s mapped <code>fn1:foo</code> and
+     * <code>fn2:foo</code> to the same method.
+     * </p>
+     * 
+     * @param obj
+     *            the <code>Object</code> to test for equality.
+     * @return <code>true</code> if <code>obj</code> equals this
+     *         <code>Expression</code>; <code>false</code> otherwise.
+     * @see java.util.Hashtable
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals(Object obj) {
+        return (obj instanceof MethodExpressionImpl && obj.hashCode() == this
+                .hashCode());
+    }
+
+    /**
+     * Returns the original String used to create this <code>Expression</code>,
+     * unmodified.
+     * 
+     * <p>
+     * This is used for debugging purposes but also for the purposes of
+     * comparison (e.g. to ensure the expression in a configuration file has not
+     * changed).
+     * </p>
+     * 
+     * <p>
+     * This method does not provide sufficient information to re-create an
+     * expression. Two different expressions can have exactly the same
+     * expression string but different function mappings. Serialization should
+     * be used to save and restore the state of an <code>Expression</code>.
+     * </p>
+     * 
+     * @return The original expression String.
+     * 
+     * @see javax.el.Expression#getExpressionString()
+     */
+    public String getExpressionString() {
+        return this.expr;
+    }
+
+    /**
+     * Evaluates the expression relative to the provided context, and returns
+     * information about the actual referenced method.
+     * 
+     * @param context
+     *            The context of this evaluation
+     * @return an instance of <code>MethodInfo</code> containing information
+     *         about the method the expression evaluated to.
+     * @throws NullPointerException
+     *             if context is <code>null</code> or the base object is
+     *             <code>null</code> on the last resolution.
+     * @throws PropertyNotFoundException
+     *             if one of the property resolutions failed because a specified
+     *             variable or property does not exist or is not readable.
+     * @throws MethodNotFoundException
+     *             if no suitable method can be found.
+     * @throws ELException
+     *             if an exception was thrown while performing property or
+     *             variable resolution. The thrown exception must be included as
+     *             the cause property of this exception, if available.
+     * @see javax.el.MethodExpression#getMethodInfo(javax.el.ELContext)
+     */
+    public MethodInfo getMethodInfo(ELContext context)
+            throws PropertyNotFoundException, MethodNotFoundException,
+            ELException {
+        Node n = this.getNode();
+        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
+                this.varMapper);
+        return n.getMethodInfo(ctx, this.paramTypes);
+    }
+
+    /**
+     * @return
+     * @throws ELException
+     */
+    private Node getNode() throws ELException {
+        if (this.node == null) {
+            this.node = ExpressionBuilder.createNode(this.expr);
+        }
+        return this.node;
+    }
+
+    /**
+     * Returns the hash code for this <code>Expression</code>.
+     * 
+     * <p>
+     * See the note in the {@link #equals} method on how two expressions can be
+     * equal if their expression Strings are different. Recall that if two
+     * objects are equal according to the <code>equals(Object)</code> method,
+     * then calling the <code>hashCode</code> method on each of the two
+     * objects must produce the same integer result. Implementations must take
+     * special note and implement <code>hashCode</code> correctly.
+     * </p>
+     * 
+     * @return The hash code for this <code>Expression</code>.
+     * @see #equals
+     * @see java.util.Hashtable
+     * @see java.lang.Object#hashCode()
+     */
+    public int hashCode() {
+        return this.expr.hashCode();
+    }
+
+    /**
+     * Evaluates the expression relative to the provided context, invokes the
+     * method that was found using the supplied parameters, and returns the
+     * result of the method invocation.
+     * 
+     * @param context
+     *            The context of this evaluation.
+     * @param params
+     *            The parameters to pass to the method, or <code>null</code>
+     *            if no parameters.
+     * @return the result of the method invocation (<code>null</code> if the
+     *         method has a <code>void</code> return type).
+     * @throws NullPointerException
+     *             if context is <code>null</code> or the base object is
+     *             <code>null</code> on the last resolution.
+     * @throws PropertyNotFoundException
+     *             if one of the property resolutions failed because a specified
+     *             variable or property does not exist or is not readable.
+     * @throws MethodNotFoundException
+     *             if no suitable method can be found.
+     * @throws ELException
+     *             if an exception was thrown while performing property or
+     *             variable resolution. The thrown exception must be included as
+     *             the cause property of this exception, if available. If the
+     *             exception thrown is an <code>InvocationTargetException</code>,
+     *             extract its <code>cause</code> and pass it to the
+     *             <code>ELException</code> constructor.
+     * @see javax.el.MethodExpression#invoke(javax.el.ELContext,
+     *      java.lang.Object[])
+     */
+    public Object invoke(ELContext context, Object[] params)
+            throws PropertyNotFoundException, MethodNotFoundException,
+            ELException {
+        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
+                this.varMapper);
+        return this.getNode().invoke(ctx, this.paramTypes, params);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.io.Externalizable#readExternal(java.io.ObjectInput)
+     */
+    public void readExternal(ObjectInput in) throws IOException,
+            ClassNotFoundException {
+        this.expr = in.readUTF();
+        String type = in.readUTF();
+        if (!"".equals(type)) {
+            this.expectedType = ReflectionUtil.forName(type);
+        }
+        this.paramTypes = ReflectionUtil.toTypeArray(((String[]) in
+                .readObject()));
+        this.fnMapper = (FunctionMapper) in.readObject();
+        this.varMapper = (VariableMapper) in.readObject();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
+     */
+    public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeUTF(this.expr);
+        out.writeUTF((this.expectedType != null) ? this.expectedType.getName()
+                : "");
+        out.writeObject(ReflectionUtil.toTypeNameArray(this.paramTypes));
+        out.writeObject(this.fnMapper);
+        out.writeObject(this.varMapper);
+    }
+
+    public boolean isLiteralText() {
+        return false;
+    }
+}

Added: struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/MethodExpressionLiteral.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/MethodExpressionLiteral.java?rev=819444&view=auto
==============================================================================
--- struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/MethodExpressionLiteral.java (added)
+++ struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/MethodExpressionLiteral.java Mon Sep 28 01:55:26 2009
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.struts2.el;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.MethodExpression;
+import javax.el.MethodInfo;
+
+import org.apache.struts2.el.lang.ELSupport;
+import org.apache.struts2.el.util.ReflectionUtil;
+
+
+public class MethodExpressionLiteral extends MethodExpression implements Externalizable {
+
+    private Class expectedType;
+
+    private String expr;
+
+    private Class[] paramTypes;
+
+    public MethodExpressionLiteral() {
+        // do nothing
+    }
+
+    public MethodExpressionLiteral(String expr, Class expectedType, Class[] paramTypes) {
+        this.expr = expr;
+        this.expectedType = expectedType;
+        this.paramTypes = paramTypes;
+    }
+
+    public MethodInfo getMethodInfo(ELContext context) throws ELException {
+        return new MethodInfo(this.expr, this.expectedType, this.paramTypes);
+    }
+
+    public Object invoke(ELContext context, Object[] params) throws ELException {
+        if (this.expectedType != null) {
+            return ELSupport.coerceToType(this.expr, this.expectedType);
+        } else {
+            return this.expr;
+        }
+    }
+
+    public String getExpressionString() {
+        return this.expr;
+    }
+
+    public boolean equals(Object obj) {
+        return (obj instanceof MethodExpressionLiteral && this.hashCode() == obj.hashCode());
+    }
+
+    public int hashCode() {
+        return this.expr.hashCode();
+    }
+
+    public boolean isLiteralText() {
+        return true;
+    }
+
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+        this.expr = in.readUTF();
+        String type = in.readUTF();
+        if (!"".equals(type)) {
+            this.expectedType = ReflectionUtil.forName(type);
+        }
+        this.paramTypes = ReflectionUtil.toTypeArray(((String[]) in
+                .readObject()));
+    }
+
+    public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeUTF(this.expr);
+        out.writeUTF((this.expectedType != null) ? this.expectedType.getName()
+                : "");
+        out.writeObject(ReflectionUtil.toTypeNameArray(this.paramTypes));
+    }
+}

Added: struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ValueExpressionImpl.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ValueExpressionImpl.java?rev=819444&view=auto
==============================================================================
--- struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ValueExpressionImpl.java (added)
+++ struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ValueExpressionImpl.java Mon Sep 28 01:55:26 2009
@@ -0,0 +1,263 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.struts2.el;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.ELResolver;
+import javax.el.Expression;
+import javax.el.ExpressionFactory;
+import javax.el.FunctionMapper;
+import javax.el.PropertyNotFoundException;
+import javax.el.PropertyNotWritableException;
+import javax.el.ValueExpression;
+import javax.el.VariableMapper;
+
+import org.apache.struts2.el.lang.ELSupport;
+import org.apache.struts2.el.lang.EvaluationContext;
+import org.apache.struts2.el.lang.ExpressionBuilder;
+import org.apache.struts2.el.parser.AstLiteralExpression;
+import org.apache.struts2.el.parser.Node;
+import org.apache.struts2.el.util.ReflectionUtil;
+
+
+/**
+ * An <code>Expression</code> that can get or set a value.
+ * 
+ * <p>
+ * In previous incarnations of this API, expressions could only be read.
+ * <code>ValueExpression</code> objects can now be used both to retrieve a
+ * value and to set a value. Expressions that can have a value set on them are
+ * referred to as l-value expressions. Those that cannot are referred to as
+ * r-value expressions. Not all r-value expressions can be used as l-value
+ * expressions (e.g. <code>"${1+1}"</code> or
+ * <code>"${firstName} ${lastName}"</code>). See the EL Specification for
+ * details. Expressions that cannot be used as l-values must always return
+ * <code>true</code> from <code>isReadOnly()</code>.
+ * </p>
+ * 
+ * <p>
+ * <code>The {@link ExpressionFactory#createValueExpression} method
+ * can be used to parse an expression string and return a concrete instance
+ * of <code>ValueExpression</code> that encapsulates the parsed expression.
+ * The {@link FunctionMapper} is used at parse time, not evaluation time, 
+ * so one is not needed to evaluate an expression using this class.  
+ * However, the {@link ELContext} is needed at evaluation time.</p>
+ *
+ * <p>The {@link #getValue}, {@link #setValue}, {@link #isReadOnly} and
+ * {@link #getType} methods will evaluate the expression each time they are
+ * called. The {@link ELResolver} in the <code>ELContext</code> is used to 
+ * resolve the top-level variables and to determine the behavior of the
+ * <code>.</code> and <code>[]</code> operators. For any of the four methods,
+ * the {@link ELResolver#getValue} method is used to resolve all properties 
+ * up to but excluding the last one. This provides the <code>base</code> 
+ * object. At the last resolution, the <code>ValueExpression</code> will 
+ * call the corresponding {@link ELResolver#getValue}, 
+ * {@link ELResolver#setValue}, {@link ELResolver#isReadOnly} or 
+ * {@link ELResolver#getType} method, depending on which was called on 
+ * the <code>ValueExpression</code>.
+ * </p>
+ *
+ * <p>See the notes about comparison, serialization and immutability in 
+ * the {@link Expression} javadocs.
+ *
+ * @see javax.el.ELResolver
+ * @see javax.el.Expression
+ * @see javax.el.ExpressionFactory
+ * @see javax.el.ValueExpression
+ * 
+ * @author Jacob Hookom [jacob@hookom.net]
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: markt $
+ */
+public final class ValueExpressionImpl extends ValueExpression implements
+        Externalizable {
+
+    private Class expectedType;
+
+    private String expr;
+
+    private FunctionMapper fnMapper;
+
+    private VariableMapper varMapper;
+
+    private transient Node node;
+
+    public ValueExpressionImpl() {
+
+    }
+
+    /**
+     * 
+     */
+    public ValueExpressionImpl(String expr, Node node, FunctionMapper fnMapper,
+            VariableMapper varMapper, Class expectedType) {
+        this.expr = expr;
+        this.node = node;
+        this.fnMapper = fnMapper;
+        this.varMapper = varMapper;
+        this.expectedType = expectedType;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals(Object obj) {
+        return (obj instanceof ValueExpressionImpl && obj.hashCode() == this
+                .hashCode());
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.el.ValueExpression#getExpectedType()
+     */
+    public Class getExpectedType() {
+        return this.expectedType;
+    }
+
+    /**
+     * Returns the type the result of the expression will be coerced to after
+     * evaluation.
+     * 
+     * @return the <code>expectedType</code> passed to the
+     *         <code>ExpressionFactory.createValueExpression</code> method
+     *         that created this <code>ValueExpression</code>.
+     * 
+     * @see javax.el.Expression#getExpressionString()
+     */
+    public String getExpressionString() {
+        return this.expr;
+    }
+
+    /**
+     * @return
+     * @throws ELException
+     */
+    private Node getNode() throws ELException {
+        if (this.node == null) {
+            this.node = ExpressionBuilder.createNode(this.expr);
+        }
+        return this.node;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.el.ValueExpression#getType(javax.el.ELContext)
+     */
+    public Class getType(ELContext context) throws PropertyNotFoundException,
+            ELException {
+        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
+                this.varMapper);
+        return this.getNode().getType(ctx);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.el.ValueExpression#getValue(javax.el.ELContext)
+     */
+    public Object getValue(ELContext context) throws PropertyNotFoundException,
+            ELException {
+        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
+                this.varMapper);
+        Object value = this.getNode().getValue(ctx);
+        if (this.expectedType != null) {
+            return ELSupport.coerceToType(value, this.expectedType);
+        }
+        return value;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    public int hashCode() {
+        return this.expr.hashCode();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.el.ValueExpression#isLiteralText()
+     */
+    public boolean isLiteralText() {
+        try {
+            return this.getNode() instanceof AstLiteralExpression;
+        } catch (ELException ele) {
+            return false;
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.el.ValueExpression#isReadOnly(javax.el.ELContext)
+     */
+    public boolean isReadOnly(ELContext context)
+            throws PropertyNotFoundException, ELException {
+        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
+                this.varMapper);
+        return this.getNode().isReadOnly(ctx);
+    }
+
+    public void readExternal(ObjectInput in) throws IOException,
+            ClassNotFoundException {
+        this.expr = in.readUTF();
+        String type = in.readUTF();
+        if (!"".equals(type)) {
+            this.expectedType = ReflectionUtil.forName(type);
+        }
+        this.fnMapper = (FunctionMapper) in.readObject();
+        this.varMapper = (VariableMapper) in.readObject();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.el.ValueExpression#setValue(javax.el.ELContext,
+     *      java.lang.Object)
+     */
+    public void setValue(ELContext context, Object value)
+            throws PropertyNotFoundException, PropertyNotWritableException,
+            ELException {
+        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
+                this.varMapper);
+        this.getNode().setValue(ctx, value);
+    }
+
+    public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeUTF(this.expr);
+        out.writeUTF((this.expectedType != null) ? this.expectedType.getName()
+                : "");
+        out.writeObject(this.fnMapper);
+        out.writeObject(this.varMapper);
+    }
+
+    public String toString() {
+        return "ValueExpression["+this.expr+"]";
+    }
+}

Added: struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ValueExpressionLiteral.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ValueExpressionLiteral.java?rev=819444&view=auto
==============================================================================
--- struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ValueExpressionLiteral.java (added)
+++ struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/ValueExpressionLiteral.java Mon Sep 28 01:55:26 2009
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.struts2.el;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import javax.el.ELContext;
+import javax.el.PropertyNotWritableException;
+
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import javax.el.ValueExpression;
+
+import org.apache.struts2.el.lang.ELSupport;
+import org.apache.struts2.el.util.MessageFactory;
+import org.apache.struts2.el.util.ReflectionUtil;
+
+
+public final class ValueExpressionLiteral extends ValueExpression implements
+        Externalizable {
+
+    private static final long serialVersionUID = 1L;
+
+    private Object value;
+
+    private Class expectedType;
+
+    public ValueExpressionLiteral() {
+        super();
+    }
+
+    public ValueExpressionLiteral(Object value, Class expectedType) {
+        this.value = value;
+        this.expectedType = expectedType;
+    }
+
+    public Object getValue(ELContext context) {
+        if (this.expectedType != null) {
+            return ELSupport.coerceToType(this.value, this.expectedType);
+        }
+        return this.value;
+    }
+
+    public void setValue(ELContext context, Object value) {
+        throw new PropertyNotWritableException(MessageFactory.get(
+                "error.value.literal.write", this.value));
+    }
+
+    public boolean isReadOnly(ELContext context) {
+        return true;
+    }
+
+    public Class getType(ELContext context) {
+        return (this.value != null) ? this.value.getClass() : null;
+    }
+
+    public Class getExpectedType() {
+        return this.expectedType;
+    }
+
+    public String getExpressionString() {
+        return (this.value != null) ? this.value.toString() : null;
+    }
+
+    public boolean equals(Object obj) {
+        return (obj instanceof ValueExpressionLiteral && this
+                .equals((ValueExpressionLiteral) obj));
+    }
+
+    public boolean equals(ValueExpressionLiteral ve) {
+        return (ve != null && (this.value != null && ve.value != null && (this.value == ve.value || this.value
+                .equals(ve.value))));
+    }
+
+    public int hashCode() {
+        return (this.value != null) ? this.value.hashCode() : 0;
+    }
+
+    public boolean isLiteralText() {
+        return true;
+    }
+
+    public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeObject(this.value);
+        out.writeUTF((this.expectedType != null) ? this.expectedType.getName()
+                : "");
+    }
+
+    public void readExternal(ObjectInput in) throws IOException,
+            ClassNotFoundException {
+        this.value = in.readObject();
+        String type = in.readUTF();
+        if (!"".equals(type)) {
+            this.expectedType = ReflectionUtil.forName(type);
+        }
+    }
+}

Added: struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/ELArithmetic.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/ELArithmetic.java?rev=819444&view=auto
==============================================================================
--- struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/ELArithmetic.java (added)
+++ struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/lang/ELArithmetic.java Mon Sep 28 01:55:26 2009
@@ -0,0 +1,377 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.struts2.el.lang;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import org.apache.struts2.el.util.MessageFactory;
+
+
+/**
+ * A helper class of Arithmetic defined by the EL Specification
+ * @author Jacob Hookom [jacob@hookom.net]
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: rjung $
+ */
+public abstract class ELArithmetic {
+
+    public final static class BigDecimalDelegate extends ELArithmetic {
+
+        protected Number add(Number num0, Number num1) {
+            return ((BigDecimal) num0).add((BigDecimal) num1);
+        }
+
+        protected Number coerce(Number num) {
+            if (num instanceof BigDecimal)
+                return num;
+            if (num instanceof BigInteger)
+                return new BigDecimal((BigInteger) num);
+            return new BigDecimal(num.doubleValue());
+        }
+
+        protected Number coerce(String str) {
+            return new BigDecimal(str);
+        }
+
+        protected Number divide(Number num0, Number num1) {
+            return ((BigDecimal) num0).divide((BigDecimal) num1,
+                    BigDecimal.ROUND_HALF_UP);
+        }
+
+        protected Number subtract(Number num0, Number num1) {
+            return ((BigDecimal) num0).subtract((BigDecimal) num1);
+        }
+
+        protected Number mod(Number num0, Number num1) {
+            return new Double(num0.doubleValue() % num1.doubleValue());
+        }
+
+        protected Number multiply(Number num0, Number num1) {
+            return ((BigDecimal) num0).multiply((BigDecimal) num1);
+        }
+
+        public boolean matches(Object obj0, Object obj1) {
+            return (obj0 instanceof BigDecimal || obj1 instanceof BigDecimal);
+        }
+    }
+
+    public final static class BigIntegerDelegate extends ELArithmetic {
+
+        protected Number add(Number num0, Number num1) {
+            return ((BigInteger) num0).add((BigInteger) num1);
+        }
+
+        protected Number coerce(Number num) {
+            if (num instanceof BigInteger)
+                return num;
+            return new BigInteger(num.toString());
+        }
+
+        protected Number coerce(String str) {
+            return new BigInteger(str);
+        }
+
+        protected Number divide(Number num0, Number num1) {
+            return (new BigDecimal((BigInteger) num0)).divide(new BigDecimal((BigInteger) num1), BigDecimal.ROUND_HALF_UP);
+        }
+
+        protected Number multiply(Number num0, Number num1) {
+            return ((BigInteger) num0).multiply((BigInteger) num1);
+        }
+
+        protected Number mod(Number num0, Number num1) {
+            return ((BigInteger) num0).mod((BigInteger) num1);
+        }
+
+        protected Number subtract(Number num0, Number num1) {
+            return ((BigInteger) num0).subtract((BigInteger) num1);
+        }
+
+        public boolean matches(Object obj0, Object obj1) {
+            return (obj0 instanceof BigInteger || obj1 instanceof BigInteger);
+        }
+    }
+
+    public final static class DoubleDelegate extends ELArithmetic {
+
+        protected Number add(Number num0, Number num1) {
+            // could only be one of these
+            if (num0 instanceof BigDecimal) {
+                return ((BigDecimal) num0).add(new BigDecimal(num1.doubleValue()));
+            } else if (num1 instanceof BigDecimal) {
+                return ((new BigDecimal(num0.doubleValue()).add((BigDecimal) num1)));
+            }
+            return new Double(num0.doubleValue() + num1.doubleValue());
+        }
+
+        protected Number coerce(Number num) {
+            if (num instanceof Double)
+                return num;
+            if (num instanceof BigInteger)
+                return new BigDecimal((BigInteger) num);
+            return new Double(num.doubleValue());
+        }
+
+        protected Number coerce(String str) {
+            return new Double(str);
+        }
+
+        protected Number divide(Number num0, Number num1) {
+            return new Double(num0.doubleValue() / num1.doubleValue());
+        }
+
+        protected Number mod(Number num0, Number num1) {
+            return new Double(num0.doubleValue() % num1.doubleValue());
+        }
+
+        protected Number subtract(Number num0, Number num1) {
+            // could only be one of these
+            if (num0 instanceof BigDecimal) {
+                return ((BigDecimal) num0).subtract(new BigDecimal(num1.doubleValue()));
+            } else if (num1 instanceof BigDecimal) {
+                return ((new BigDecimal(num0.doubleValue()).subtract((BigDecimal) num1)));
+            }
+            return new Double(num0.doubleValue() - num1.doubleValue());
+        }
+
+        protected Number multiply(Number num0, Number num1) {
+            // could only be one of these
+            if (num0 instanceof BigDecimal) {
+                return ((BigDecimal) num0).multiply(new BigDecimal(num1.doubleValue()));
+            } else if (num1 instanceof BigDecimal) {
+                return ((new BigDecimal(num0.doubleValue()).multiply((BigDecimal) num1)));
+            }
+            return new Double(num0.doubleValue() * num1.doubleValue());
+        }
+
+        public boolean matches(Object obj0, Object obj1) {
+            return (obj0 instanceof Double
+                    || obj1 instanceof Double
+                    || obj0 instanceof Float
+                    || obj1 instanceof Float
+                    || (obj0 instanceof String && ELSupport
+                            .isStringFloat((String) obj0)) || (obj1 instanceof String && ELSupport
+                    .isStringFloat((String) obj1)));
+        }
+    }
+
+    public final static class LongDelegate extends ELArithmetic {
+
+        protected Number add(Number num0, Number num1) {
+            return new Long(num0.longValue() + num1.longValue());
+        }
+
+        protected Number coerce(Number num) {
+            if (num instanceof Long)
+                return num;
+            return new Long(num.longValue());
+        }
+
+        protected Number coerce(String str) {
+            return new Long(str);
+        }
+
+        protected Number divide(Number num0, Number num1) {
+            return new Long(num0.longValue() / num1.longValue());
+        }
+
+        protected Number mod(Number num0, Number num1) {
+            return new Long(num0.longValue() % num1.longValue());
+        }
+
+        protected Number subtract(Number num0, Number num1) {
+            return new Long(num0.longValue() - num1.longValue());
+        }
+
+        protected Number multiply(Number num0, Number num1) {
+            return new Long(num0.longValue() * num1.longValue());
+        }
+
+        public boolean matches(Object obj0, Object obj1) {
+            return (obj0 instanceof Long || obj1 instanceof Long);
+        }
+    }
+
+    public final static BigDecimalDelegate BIGDECIMAL = new BigDecimalDelegate();
+
+    public final static BigIntegerDelegate BIGINTEGER = new BigIntegerDelegate();
+
+    public final static DoubleDelegate DOUBLE = new DoubleDelegate();
+
+    public final static LongDelegate LONG = new LongDelegate();
+
+    private final static Long ZERO = new Long(0);
+
+    public final static Number add(final Object obj0, final Object obj1) {
+        if (obj0 == null && obj1 == null) {
+            return new Long(0);
+        }
+
+        final ELArithmetic delegate;
+        if (BIGDECIMAL.matches(obj0, obj1))
+            delegate = BIGDECIMAL;
+        else if (DOUBLE.matches(obj0, obj1))
+            delegate = DOUBLE;
+        else if (BIGINTEGER.matches(obj0, obj1))
+            delegate = BIGINTEGER;
+        else
+            delegate = LONG;
+
+        Number num0 = delegate.coerce(obj0);
+        Number num1 = delegate.coerce(obj1);
+
+        return delegate.add(num0, num1);
+    }
+
+    public final static Number mod(final Object obj0, final Object obj1) {
+        if (obj0 == null && obj1 == null) {
+            return new Long(0);
+        }
+
+        final ELArithmetic delegate;
+        if (BIGDECIMAL.matches(obj0, obj1))
+            delegate = BIGDECIMAL;
+        else if (DOUBLE.matches(obj0, obj1))
+            delegate = DOUBLE;
+        else if (BIGINTEGER.matches(obj0, obj1))
+            delegate = BIGINTEGER;
+        else
+            delegate = LONG;
+
+        Number num0 = delegate.coerce(obj0);
+        Number num1 = delegate.coerce(obj1);
+
+        return delegate.mod(num0, num1);
+    }
+
+    public final static Number subtract(final Object obj0, final Object obj1) {
+        if (obj0 == null && obj1 == null) {
+            return new Long(0);
+        }
+
+        final ELArithmetic delegate;
+        if (BIGDECIMAL.matches(obj0, obj1))
+            delegate = BIGDECIMAL;
+        else if (DOUBLE.matches(obj0, obj1))
+            delegate = DOUBLE;
+        else if (BIGINTEGER.matches(obj0, obj1))
+            delegate = BIGINTEGER;
+        else
+            delegate = LONG;
+
+        Number num0 = delegate.coerce(obj0);
+        Number num1 = delegate.coerce(obj1);
+
+        return delegate.subtract(num0, num1);
+    }
+
+    public final static Number divide(final Object obj0, final Object obj1) {
+        if (obj0 == null && obj1 == null) {
+            return ZERO;
+        }
+
+        final ELArithmetic delegate;
+        if (BIGDECIMAL.matches(obj0, obj1))
+            delegate = BIGDECIMAL;
+        else if (BIGINTEGER.matches(obj0, obj1))
+            delegate = BIGDECIMAL;
+        else
+            delegate = DOUBLE;
+
+        Number num0 = delegate.coerce(obj0);
+        Number num1 = delegate.coerce(obj1);
+
+        return delegate.divide(num0, num1);
+    }
+
+    public final static Number multiply(final Object obj0, final Object obj1) {
+        if (obj0 == null && obj1 == null) {
+            return new Long(0);
+        }
+
+        final ELArithmetic delegate;
+        if (BIGDECIMAL.matches(obj0, obj1))
+            delegate = BIGDECIMAL;
+        else if (DOUBLE.matches(obj0, obj1))
+            delegate = DOUBLE;
+        else if (BIGINTEGER.matches(obj0, obj1))
+            delegate = BIGINTEGER;
+        else
+            delegate = LONG;
+
+        Number num0 = delegate.coerce(obj0);
+        Number num1 = delegate.coerce(obj1);
+
+        return delegate.multiply(num0, num1);
+    }
+
+    public final static boolean isNumber(final Object obj) {
+        return (obj != null && isNumberType(obj.getClass()));
+    }
+
+    public final static boolean isNumberType(final Class<?> type) {
+        return type == Long.TYPE || type == Double.TYPE ||
+            type == Byte.TYPE || type == Short.TYPE ||
+            type == Integer.TYPE || type == Float.TYPE ||
+            Number.class.isAssignableFrom(type);
+    }
+
+    /**
+     *
+     */
+    protected ELArithmetic() {
+        super();
+    }
+
+    protected abstract Number add(final Number num0, final Number num1);
+
+    protected abstract Number multiply(final Number num0, final Number num1);
+
+    protected abstract Number subtract(final Number num0, final Number num1);
+
+    protected abstract Number mod(final Number num0, final Number num1);
+
+    protected abstract Number coerce(final Number num);
+
+    protected final Number coerce(final Object obj) {
+
+        if (isNumber(obj)) {
+            return coerce((Number) obj);
+        }
+        if (obj instanceof String) {
+            return coerce((String) obj);
+        }
+        if (obj == null || "".equals(obj)) {
+            return coerce(ZERO);
+        }
+
+        if (obj instanceof Character) {
+            return coerce(new Short((short) ((Character) obj).charValue()));
+        }
+
+        throw new IllegalArgumentException(MessageFactory.get("error.convert",
+                obj, obj.getClass(), "Number"));
+    }
+
+    protected abstract Number coerce(final String str);
+
+    protected abstract Number divide(final Number num0, final Number num1);
+
+    protected abstract boolean matches(final Object obj0, final Object obj1);
+
+}



Mime
View raw message