You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by ar...@apache.org on 2002/04/14 16:32:37 UTC
cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
arista 02/04/14 07:32:37
Modified: standard/src/org/apache/taglibs/standard/lang/jstl
AndOperator.java ArithmeticOperator.java
ArraySuffix.java BeanInfoManager.java
BinaryOperator.java BinaryOperatorExpression.java
ComplexValue.java Constants.java
DivideOperator.java ELException.java ELParser.jj
EqualityOperator.java EqualsOperator.java
Evaluator.java Expression.java
GreaterThanOperator.java
GreaterThanOrEqualsOperator.java
ImplicitObjects.java IntegerDivideOperator.java
LessThanOperator.java LessThanOrEqualsOperator.java
Literal.java Logger.java MinusOperator.java
ModulusOperator.java MultiplyOperator.java
NamedValue.java NotEqualsOperator.java
NotOperator.java OrOperator.java PlusOperator.java
PrimitiveObjects.java PropertySuffix.java
RelationalOperator.java Resources.properties
UnaryMinusOperator.java UnaryOperator.java
UnaryOperatorExpression.java ValueSuffix.java
standard/src/org/apache/taglibs/standard/lang/jstl/parser
ELParser.java ELParserConstants.java
ELParserTokenManager.java
standard/src/org/apache/taglibs/standard/lang/jstl/test
EvaluationTest.java ParserTest.java
evaluationTests.txt evaluationTestsOutput.txt
parserTestsOutput.txt
Added: standard/src/org/apache/taglibs/standard/lang/jstl
ELEvaluator.java ExpressionString.java
JSTLVariableResolver.java VariableResolver.java
Removed: standard/src/org/apache/taglibs/standard/lang/jstl
AttributeValue.java ImplicitObject.java
Log:
Bug 8066 - EL implementation should be made generic (non-Servlet specific)
The EL has been separated into a generic part and a JSTL-specific
part. The JSTL-specific part is still called Evaluator, but it
delegates to the generic implementation called ELEvaluator. The
following other changes were made:
* variable lookups have been abstracted into a VariableResolver
interface, which is passed to the constructor of the ELEvaluator.
The JSTLVariableResolver is the JSTL-specific implementation of
the variable resolver, which looks up variables in PageContext,
and also handles the implicit objects. The VariableResolver has
to be passed to all the expressions during evaluation, which is
why so many classes had to be changed.
* The context passed to ELEvaluator.evaluate() is just an Object,
not a PageContext. That context is eventually passed to the
VariableResolver, which is responsible for casing the context to
whatever class it expects.
* The notion of implicit objects has been removed from the parser -
the parser just parses variable references, and lets the
VariableResolver take care of implicit objects. This means that
there will be a slight difference in error messages - instead of
listing the implicit objects among the expected tokens, it will
just say <IDENTIFIER>
* The ELEvaluator has substituted all notions of "attribute value"
with "expression string". The attribute name is not passed to the
ELEvaluator.
* ELEvaluator now throws ELException, which is no longer a subclass
of JspException. The Evaluator, when it delegates to ELEvaluator,
will catch the ELException and convert it to a JspException. It
will also wrap the error message with the attribute name and
value.
If there comes a time to separate the generic and JSTL-specific parts
into different packages, the following classes should be moved into
the JSTL-specific package:
JSTLVariableResolver
Evaluator
ImplicitObjects
EnumeratedMap (this is generic, but it's only used by ImplicitObjects)
These are the only classes that still contain references to servlet or
JSP api's. There are also couple of error messages in
Resources.properties/Constants.java that should be moved - in
particular:
ATTRIBUTE_EVALUATION_EXCEPTION
ATTRIBUTE_PARSE_EXCEPTION
Revision Changes Path
1.3 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/AndOperator.java
Index: AndOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/AndOperator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AndOperator.java 13 Mar 2002 22:47:19 -0000 1.2
+++ AndOperator.java 14 Apr 2002 14:32:35 -0000 1.3
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the and operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class AndOperator
@@ -104,9 +101,9 @@
**/
public Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
// Coerce the values to booleans
boolean left =
1.2 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ArithmeticOperator.java
Index: ArithmeticOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ArithmeticOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ArithmeticOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ ArithmeticOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>This is the superclass for all binary arithmetic operators
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public abstract class ArithmeticOperator
@@ -76,9 +73,9 @@
**/
public Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
return Coercions.applyArithmeticOperator (pLeft, pRight, this, pLogger);
}
1.3 +9 -8 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ArraySuffix.java
Index: ArraySuffix.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ArraySuffix.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ArraySuffix.java 5 Mar 2002 21:14:29 -0000 1.2
+++ ArraySuffix.java 14 Apr 2002 14:32:35 -0000 1.3
@@ -59,8 +59,6 @@
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
/**
*
@@ -103,7 +101,7 @@
* </pre></ul>
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class ArraySuffix
@@ -142,11 +140,12 @@
*
* Gets the value of the index
**/
- Object evaluateIndex (PageContext pContext,
+ Object evaluateIndex (Object pContext,
+ VariableResolver pResolver,
Logger pLogger)
- throws JspException
+ throws ELException
{
- return mIndex.evaluate (pContext, pLogger);
+ return mIndex.evaluate (pContext, pResolver, pLogger);
}
//-------------------------------------
@@ -178,9 +177,10 @@
* given value.
**/
public Object evaluate (Object pValue,
- PageContext pContext,
+ Object pContext,
+ VariableResolver pResolver,
Logger pLogger)
- throws JspException
+ throws ELException
{
Object indexVal;
String indexStr;
@@ -198,7 +198,8 @@
}
// Evaluate the index
- else if ((indexVal = evaluateIndex (pContext, pLogger)) == null) {
+ else if ((indexVal = evaluateIndex (pContext, pResolver, pLogger)) ==
+ null) {
if (pLogger.isLoggingWarning ()) {
pLogger.logWarning
(Constants.CANT_GET_NULL_INDEX,
1.2 +8 -9 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/BeanInfoManager.java
Index: BeanInfoManager.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/BeanInfoManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BeanInfoManager.java 5 Mar 2002 14:10:43 -0000 1.1
+++ BeanInfoManager.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -66,7 +66,6 @@
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
-import javax.servlet.jsp.JspException;
/**
*
@@ -78,7 +77,7 @@
* again.
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181181 $$DateTime: 2001/06/26 09:55:09 $$Author: shawn $
+ * @version $Change: 181181 $$DateTime: 2001/06/26 09:55:09 $$Author: arista $
**/
public class BeanInfoManager
@@ -174,7 +173,7 @@
(Class pClass,
String pPropertyName,
Logger pLogger)
- throws JspException
+ throws ELException
{
return getBeanInfoManager (pClass).getProperty (pPropertyName, pLogger);
}
@@ -189,7 +188,7 @@
(Class pClass,
String pIndexedPropertyName,
Logger pLogger)
- throws JspException
+ throws ELException
{
return getBeanInfoManager
(pClass).getIndexedProperty (pIndexedPropertyName, pLogger);
@@ -202,7 +201,7 @@
* the initialization if it's required.
**/
void checkInitialized (Logger pLogger)
- throws JspException
+ throws ELException
{
if (!mInitialized) {
synchronized (this) {
@@ -220,7 +219,7 @@
* Initializes by mapping property names to BeanInfoProperties
**/
void initialize (Logger pLogger)
- throws JspException
+ throws ELException
{
try {
mBeanInfo = Introspector.getBeanInfo (mBeanClass);
@@ -276,7 +275,7 @@
* Returns the BeanInfo for the class
**/
BeanInfo getBeanInfo (Logger pLogger)
- throws JspException
+ throws ELException
{
checkInitialized (pLogger);
return mBeanInfo;
@@ -290,7 +289,7 @@
**/
public BeanInfoProperty getProperty (String pPropertyName,
Logger pLogger)
- throws JspException
+ throws ELException
{
checkInitialized (pLogger);
return (BeanInfoProperty) mPropertyByName.get (pPropertyName);
@@ -305,7 +304,7 @@
public BeanInfoIndexedProperty getIndexedProperty
(String pIndexedPropertyName,
Logger pLogger)
- throws JspException
+ throws ELException
{
checkInitialized (pLogger);
return (BeanInfoIndexedProperty)
@@ -320,7 +319,7 @@
**/
public EventSetDescriptor getEventSet (String pEventSetName,
Logger pLogger)
- throws JspException
+ throws ELException
{
checkInitialized (pLogger);
return (EventSetDescriptor) mEventSetByName.get (pEventSetName);
1.3 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/BinaryOperator.java
Index: BinaryOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/BinaryOperator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BinaryOperator.java 13 Mar 2002 22:47:19 -0000 1.2
+++ BinaryOperator.java 14 Apr 2002 14:32:35 -0000 1.3
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>This is the superclass for all binary operators
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public abstract class BinaryOperator
@@ -93,9 +90,9 @@
**/
public abstract Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException;
+ throws ELException;
//-------------------------------------
/**
1.3 +5 -6 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/BinaryOperatorExpression.java
Index: BinaryOperatorExpression.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/BinaryOperatorExpression.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BinaryOperatorExpression.java 13 Mar 2002 22:47:19 -0000 1.2
+++ BinaryOperatorExpression.java 14 Apr 2002 14:32:35 -0000 1.3
@@ -56,15 +56,13 @@
package org.apache.taglibs.standard.lang.jstl;
import java.util.List;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
/**
*
* <p>An expression representing a unary operator on a value
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class BinaryOperatorExpression
@@ -143,11 +141,12 @@
*
* Evaluates to the literal value
**/
- public Object evaluate (PageContext pContext,
+ public Object evaluate (Object pContext,
+ VariableResolver pResolver,
Logger pLogger)
- throws JspException
+ throws ELException
{
- Object value = mExpression.evaluate (pContext, pLogger);
+ Object value = mExpression.evaluate (pContext, pResolver, pLogger);
for (int i = 0; i < mOperators.size (); i++) {
BinaryOperator operator = (BinaryOperator) mOperators.get (i);
@@ -159,7 +158,7 @@
if (operator.shouldEvaluate (value)) {
Expression expression = (Expression) mExpressions.get (i);
- Object nextValue = expression.evaluate (pContext, pLogger);
+ Object nextValue = expression.evaluate (pContext, pResolver, pLogger);
value = operator.apply (value, nextValue, pContext, pLogger);
}
1.2 +6 -7 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ComplexValue.java
Index: ComplexValue.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ComplexValue.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ComplexValue.java 5 Mar 2002 14:10:43 -0000 1.1
+++ ComplexValue.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -56,8 +56,6 @@
package org.apache.taglibs.standard.lang.jstl;
import java.util.List;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
/**
*
@@ -67,7 +65,7 @@
* "indexed element of" operator.
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class ComplexValue
@@ -128,18 +126,19 @@
//-------------------------------------
/**
*
- * Evaluates by looking up the name as an attribute
+ * Evaluates by evaluating the prefix, then applying the suffixes
**/
- public Object evaluate (PageContext pContext,
+ public Object evaluate (Object pContext,
+ VariableResolver pResolver,
Logger pLogger)
- throws JspException
+ throws ELException
{
- Object ret = mPrefix.evaluate (pContext, pLogger);
+ Object ret = mPrefix.evaluate (pContext, pResolver, pLogger);
// Apply the suffixes
for (int i = 0; mSuffixes != null && i < mSuffixes.size (); i++) {
ValueSuffix suffix = (ValueSuffix) mSuffixes.get (i);
- ret = suffix.evaluate (ret, pContext, pLogger);
+ ret = suffix.evaluate (ret, pContext, pResolver, pLogger);
}
return ret;
1.3 +8 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/Constants.java
Index: Constants.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/Constants.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Constants.java 31 Mar 2002 16:41:57 -0000 1.2
+++ Constants.java 14 Apr 2002 14:32:35 -0000 1.3
@@ -82,8 +82,8 @@
public static final String EXCEPTION_GETTING_BEANINFO =
getStringResource ("EXCEPTION_GETTING_BEANINFO");
- public static final String NULL_ATTRIBUTE_VALUE =
- getStringResource ("NULL_ATTRIBUTE_VALUE");
+ public static final String NULL_EXPRESSION_STRING =
+ getStringResource ("NULL_EXPRESSION_STRING");
public static final String PARSE_EXCEPTION =
getStringResource ("PARSE_EXCEPTION");
@@ -187,8 +187,11 @@
public static final String BAD_IMPLICIT_OBJECT =
getStringResource ("BAD_IMPLICIT_OBJECT");
- public static final String EVALUATION_EXCEPTION =
- getStringResource ("EVALUATION_EXCEPTION");
+ public static final String ATTRIBUTE_EVALUATION_EXCEPTION =
+ getStringResource ("ATTRIBUTE_EVALUATION_EXCEPTION");
+
+ public static final String ATTRIBUTE_PARSE_EXCEPTION =
+ getStringResource ("ATTRIBUTE_PARSE_EXCEPTION");
//-------------------------------------
// Getting resources
1.2 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/DivideOperator.java
Index: DivideOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/DivideOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DivideOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ DivideOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the divide operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class DivideOperator
@@ -104,9 +101,9 @@
**/
public Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
if (pLeft == null &&
pRight == null) {
1.2 +23 -7 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ELException.java
Index: ELException.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ELException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ELException.java 5 Mar 2002 14:10:43 -0000 1.1
+++ ELException.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -56,7 +56,6 @@
package org.apache.taglibs.standard.lang.jstl;
import java.text.MessageFormat;
-import javax.servlet.jsp.JspException;
/**
*
@@ -64,13 +63,19 @@
* operation evaluation of the evaluator.
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class ELException
- extends JspException
+ extends Exception
{
//-------------------------------------
+ // Member variables
+ //-------------------------------------
+
+ Throwable mRootCause;
+
+ //-------------------------------------
/**
*
* Constructor
@@ -97,7 +102,7 @@
**/
public ELException (Throwable pRootCause)
{
- super (pRootCause);
+ mRootCause = pRootCause;
}
//-------------------------------------
@@ -108,7 +113,18 @@
public ELException (String pMessage,
Throwable pRootCause)
{
- super (pMessage, pRootCause);
+ super (pMessage);
+ mRootCause = pRootCause;
+ }
+
+ //-------------------------------------
+ /**
+ *
+ * Returns the root cause
+ **/
+ public Throwable getRootCause ()
+ {
+ return mRootCause;
}
//-------------------------------------
@@ -119,13 +135,13 @@
public String toString ()
{
if (getMessage () == null) {
- return getRootCause ().toString ();
+ return mRootCause.toString ();
}
- else if (getRootCause () == null) {
+ else if (mRootCause == null) {
return getMessage ();
}
else {
- return getMessage () + ": " + getRootCause ();
+ return getMessage () + ": " + mRootCause;
}
}
1.11 +7 -35 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ELParser.jj
Index: ELParser.jj
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ELParser.jj,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ELParser.jj 12 Apr 2002 11:28:42 -0000 1.10
+++ ELParser.jj 14 Apr 2002 14:32:35 -0000 1.11
@@ -25,7 +25,7 @@
throws ParseException
{
ELParser parser = new ELParser (System.in);
- parser.AttributeValue ();
+ parser.ExpressionString ();
}
}
@@ -123,13 +123,7 @@
| < AND2: "&&" >
| < OR1: "or" >
| < OR2: "||" >
-| < PAGE_CONTEXT: "pageContext" >
-| < PAGE: "page" >
-| < REQUEST: "request" >
-| < SESSION: "session" >
-| < APPLICATION: "application" >
-| < PARAM: "param" >
-| < PARAMS: "params" >
+
/* Identifiers */
@@ -186,11 +180,11 @@
/**
*
- * Returns a String if the attribute value is a single String, an
- * Expression if the attribute value is a single Expression, an
- * AttributeValue if it's a mixture of both.
+ * Returns a String if the expression string is a single String, an
+ * Expression if the expression string is a single Expression, an
+ * ExpressionString if it's a mixture of both.
**/
-Object AttributeValue () :
+Object ExpressionString () :
{
Object ret = "";
List elems = null;
@@ -215,7 +209,7 @@
{
if (elems != null) {
- ret = new AttributeValue (elems.toArray ());
+ ret = new ExpressionString (elems.toArray ());
}
return ret;
}
@@ -584,7 +578,6 @@
ret = Literal ()
| <LPAREN> ret = Expression () <RPAREN>
| ret = NamedValue ()
- | ret = ImplicitObject ()
)
{ return ret; }
}
@@ -714,27 +707,6 @@
{
(
t = <IDENTIFIER>
- | t = <PAGE_CONTEXT>
- | t = <PAGE>
- | t = <REQUEST>
- | t = <SESSION>
- | t = <APPLICATION>
- | t = <PARAM>
- | t = <PARAMS>
)
{ return t.image; }
-}
-
-
-ImplicitObject ImplicitObject () :
-{
-}
-{
- <PAGE_CONTEXT> { return ImplicitObject.PAGE_CONTEXT; }
- | <PAGE> { return ImplicitObject.PAGE; }
- | <REQUEST> { return ImplicitObject.REQUEST; }
- | <SESSION> { return ImplicitObject.SESSION; }
- | <APPLICATION> { return ImplicitObject.APPLICATION; }
- | <PARAM> { return ImplicitObject.PARAM; }
- | <PARAMS> { return ImplicitObject.PARAMS; }
}
1.2 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/EqualityOperator.java
Index: EqualityOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/EqualityOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- EqualityOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ EqualityOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>This is the superclass for all equality operators (==, !=)
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public abstract class EqualityOperator
@@ -76,9 +73,9 @@
**/
public Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
return Coercions.applyEqualityOperator (pLeft, pRight, this, pLogger);
}
1.2 +0 -3 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/EqualsOperator.java
Index: EqualsOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/EqualsOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- EqualsOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ EqualsOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the equals operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class EqualsOperator
1.4 +179 -498 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/Evaluator.java
Index: Evaluator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/Evaluator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Evaluator.java 31 Mar 2002 16:41:57 -0000 1.3
+++ Evaluator.java 14 Apr 2002 14:32:35 -0000 1.4
@@ -1,498 +1,179 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-
-package org.apache.taglibs.standard.lang.jstl;
-
-import java.beans.PropertyEditor;
-import java.beans.PropertyEditorManager;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.text.MessageFormat;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-import javax.servlet.jsp.tagext.Tag;
-import org.apache.taglibs.standard.lang.jstl.parser.ELParser;
-import org.apache.taglibs.standard.lang.jstl.parser.ParseException;
-import org.apache.taglibs.standard.lang.jstl.parser.Token;
-import org.apache.taglibs.standard.lang.jstl.parser.TokenMgrError;
-import org.apache.taglibs.standard.lang.support.ExpressionEvaluator;
-
-/**
- *
- * <p>This is the main class for evaluating attribute values. An
- * attribute value may contain expressions of the form ${...}.
- * Multiple expressions may appear in the same attribute value. In
- * such a case, the attribute's value is computed by concatenating the
- * String values of those evaluated expressions and any intervening
- * non-expression text, then converting the resulting String to the
- * expected type using the PropertyEditor mechanism.
- *
- * <p>In the special case where the attribute value is a single
- * expression, the value of the attribute is determined by evaluating
- * the expression, without any intervening conversion to a String.
- *
- * <p>The evaluator maintains a cache mapping attribute value strings
- * to their parsed results. For attribute values containing no
- * expression elements, it maintains a cache mapping
- * ExpectedType/ExpressionString to parsed value, so that static
- * attribute values won't have to go through a conversion step every
- * time they are used.
- *
- * @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
- **/
-
-public class Evaluator
- implements ExpressionEvaluator
-{
- //-------------------------------------
- // Properties
- //-------------------------------------
-
- //-------------------------------------
- // Member variables
- //-------------------------------------
-
- // The mapping from attribute value to its parsed form (String,
- // Expression, or AttributeValue)
- static Map mCachedAttributeValues =
- Collections.synchronizedMap (new HashMap ());
-
- // The mapping from ExpectedType to Maps mapping literal String to
- // parsed value
- static Map mCachedExpectedTypes = new HashMap ();
-
- //-------------------------------------
- /**
- *
- * Constructor
- **/
- public Evaluator ()
- {
- }
-
- //-------------------------------------
- /**
- *
- * Evaluates the given attribute value
- **/
- public Object evaluate (String pAttributeName,
- String pAttributeValue,
- PageContext pPageContext,
- Class pExpectedType)
- throws JspException
- {
- Logger logger = new Logger (pPageContext);
-
- return evaluate (pAttributeName,
- pAttributeValue,
- pPageContext,
- pExpectedType,
- logger);
- }
-
- //-------------------------------------
- /**
- *
- * Evaluates the given attribute value
- **/
- public Object evaluate (String pAttributeName,
- String pAttributeValue,
- PageContext pPageContext,
- Class pExpectedType,
- Logger pLogger)
- throws JspException
- {
- try {
- // Check for null attribute values
- if (pAttributeValue == null) {
- throw new ELException
- (Constants.NULL_ATTRIBUTE_VALUE);
- }
-
- // Get the parsed version of the attribute value
- Object parsedValue = getOrParseAttributeValue (pAttributeName,
- pAttributeValue);
-
- // Evaluate differently based on the parsed type
- if (parsedValue instanceof String) {
- // Convert the String, and cache the conversion
- String strValue = (String) parsedValue;
- return convertStaticValueToExpectedType (strValue,
- pExpectedType,
- pLogger);
- }
-
- else if (parsedValue instanceof Expression) {
- // Evaluate the expression and convert
- Object value =
- ((Expression) parsedValue).evaluate (pPageContext, pLogger);
- return convertToExpectedType (value,
- pExpectedType,
- pLogger);
- }
-
- else if (parsedValue instanceof AttributeValue) {
- // Evaluate the expression/string list and convert
- String strValue =
- ((AttributeValue) parsedValue).evaluate (pPageContext, pLogger);
- return convertToExpectedType (strValue,
- pExpectedType,
- pLogger);
- }
-
- else {
- // This should never be reached
- return null;
- }
- }
- catch (ELException exc) {
- throw new ELException
- (MessageFormat.format
- (Constants.EVALUATION_EXCEPTION,
- new Object [] {
- "" + pAttributeName,
- "" + pAttributeValue,
- "" + exc
- }));
- }
- }
-
- //-------------------------------------
- /**
- *
- * Gets the parsed form of the given attribute value. If the parsed
- * form is cached, return the cached form, otherwise parse and cache
- * the value. Returns either a String, Expression, or
- * AttributeValue.
- **/
- public static Object getOrParseAttributeValue (String pAttributeName,
- String pAttributeValue)
- throws JspException
- {
- // See if it's an empty String
- if (pAttributeValue.length () == 0) {
- return "";
- }
-
- // See if it's in the cache
- Object ret = mCachedAttributeValues.get (pAttributeValue);
-
- if (ret == null) {
- // Parse the expression
- Reader r = new StringReader (pAttributeValue);
- ELParser parser = new ELParser (r);
- try {
- ret = parser.AttributeValue ();
- mCachedAttributeValues.put (pAttributeValue, ret);
- }
- catch (ParseException exc) {
- throw new ELException
- (formatParseException (pAttributeName,
- pAttributeValue,
- exc));
- }
- catch (TokenMgrError exc) {
- // Note - this should never be reached, since the parser is
- // constructed to tokenize any input (illegal inputs get
- // parsed to <BADLY_ESCAPED_STRING_LITERAL> or
- // <ILLEGAL_CHARACTER>
- throw new ELException (exc.getMessage ());
- }
- }
- return ret;
- }
-
- //-------------------------------------
- /**
- *
- * Converts the given value to the specified expected type.
- **/
- Object convertToExpectedType (Object pValue,
- Class pExpectedType,
- Logger pLogger)
- throws ELException
- {
- return Coercions.coerce (pValue,
- pExpectedType,
- pLogger);
- }
-
- //-------------------------------------
- /**
- *
- * Converts the given String, specified as a static attribute value,
- * to the given expected type. The conversion is cached.
- **/
- Object convertStaticValueToExpectedType (String pValue,
- Class pExpectedType,
- Logger pLogger)
- throws ELException
- {
- // See if the value is already of the expected type
- if (pExpectedType == String.class ||
- pExpectedType == Object.class) {
- return pValue;
- }
-
- // Find the cached value
- Map valueByString = getOrCreateExpectedTypeMap (pExpectedType);
- if (valueByString.containsKey (pValue)) {
- return valueByString.get (pValue);
- }
- else {
- // Convert from a String
- Object ret = Coercions.coerce (pValue, pExpectedType, pLogger);
- valueByString.put (pValue, ret);
- return ret;
- }
- }
-
- //-------------------------------------
- /**
- *
- * Creates or returns the Map that maps string literals to parsed
- * values for the specified expected type.
- **/
- static Map getOrCreateExpectedTypeMap (Class pExpectedType)
- {
- synchronized (mCachedExpectedTypes) {
- Map ret = (Map) mCachedExpectedTypes.get (pExpectedType);
- if (ret == null) {
- ret = Collections.synchronizedMap (new HashMap ());
- mCachedExpectedTypes.put (pExpectedType, ret);
- }
- return ret;
- }
- }
-
- //-------------------------------------
- // ExpressionEvaluator methods
- //-------------------------------------
- /**
- *
- * Translation time validation of an attribute value. This method
- * will return a null String if the attribute value is valid;
- * otherwise an error message.
- **/
- public String validate (String pAttributeName,
- String pAttributeValue)
- {
- if (pAttributeValue == null) {
- return Constants.NULL_ATTRIBUTE_VALUE;
- }
- else {
- try {
- getOrParseAttributeValue (pAttributeName,
- pAttributeValue);
- return null;
- }
- catch (JspException exc) {
- return exc.toString ();
- }
- }
- }
-
- //-------------------------------------
- /**
- *
- * Evaluates the expression at request time
- **/
- public Object evaluate (String pAttributeName,
- String pAttributeValue,
- Class pExpectedType,
- Tag pTag,
- PageContext pPageContext)
- throws JspException
- {
- return evaluate (pAttributeName,
- pAttributeValue,
- pPageContext,
- pExpectedType);
- }
-
- //-------------------------------------
- // Formatting ParseException
- //-------------------------------------
- /**
- *
- * Formats a ParseException into an error message suitable for
- * displaying on a web page
- **/
- static String formatParseException (String pAttributeName,
- String pAttributeValue,
- ParseException pExc)
- {
- // Generate the String of expected tokens
- StringBuffer expectedBuf = new StringBuffer ();
- int maxSize = 0;
- boolean printedOne = false;
- for (int i = 0; i < pExc.expectedTokenSequences.length; i++) {
- if (maxSize < pExc.expectedTokenSequences [i].length) {
- maxSize = pExc.expectedTokenSequences [i].length;
- }
- for (int j = 0; j < pExc.expectedTokenSequences [i].length; j++) {
- if (printedOne) {
- expectedBuf.append (", ");
- }
- expectedBuf.append
- (pExc.tokenImage [pExc.expectedTokenSequences [i] [j]]);
- printedOne = true;
- }
- }
- String expected = expectedBuf.toString ();
-
- // Generate the String of encountered tokens
- StringBuffer encounteredBuf = new StringBuffer ();
- Token tok = pExc.currentToken.next;
- for (int i = 0; i < maxSize; i++) {
- if (i != 0) encounteredBuf.append (" ");
- if (tok.kind == 0) {
- encounteredBuf.append (pExc.tokenImage [0]);
- break;
- }
- encounteredBuf.append (addEscapes (tok.image));
- tok = tok.next;
- }
- String encountered = encounteredBuf.toString ();
-
- // Format the error message
- return MessageFormat.format
- (Constants.PARSE_EXCEPTION,
- new Object [] {
- expected,
- encountered,
- "" + pAttributeName,
- "" + pAttributeValue,
- });
- }
-
- //-------------------------------------
- /**
- *
- * Used to convert raw characters to their escaped version when
- * these raw version cannot be used as part of an ASCII string
- * literal.
- **/
- static String addEscapes (String str)
- {
- StringBuffer retval = new StringBuffer ();
- char ch;
- for (int i = 0; i < str.length (); i++) {
- switch (str.charAt (i)) {
- case 0 :
- continue;
- case '\b':
- retval.append ("\\b");
- continue;
- case '\t':
- retval.append ("\\t");
- continue;
- case '\n':
- retval.append ("\\n");
- continue;
- case '\f':
- retval.append ("\\f");
- continue;
- case '\r':
- retval.append ("\\r");
- continue;
- default:
- if ((ch = str.charAt (i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString (ch, 16);
- retval.append ("\\u" + s.substring (s.length () - 4, s.length ()));
- }
- else {
- retval.append (ch);
- }
- continue;
- }
- }
- return retval.toString ();
- }
-
- //-------------------------------------
- // Testing methods
- //-------------------------------------
- /**
- *
- * Parses the given attribute value, then converts it back to a
- * String in its canonical form.
- **/
- public static String parseAndRender (String pAttributeValue)
- throws JspException
- {
- Object val = getOrParseAttributeValue ("test", pAttributeValue);
- if (val instanceof String) {
- return (String) val;
- }
- else if (val instanceof Expression) {
- return "${" + ((Expression) val).getExpressionString () + "}";
- }
- else if (val instanceof AttributeValue) {
- return ((AttributeValue) val).getExpressionString ();
- }
- else {
- return "";
- }
- }
-
- //-------------------------------------
-
-}
+/*
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.taglibs.standard.lang.jstl;
+
+import java.text.MessageFormat;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.Tag;
+import org.apache.taglibs.standard.lang.support.ExpressionEvaluator;
+
+/**
+ *
+ * <p>This is the expression evaluator "adapter" that customizes it
+ * for use with the JSP Standard Tag Library. It uses a
+ * VariableResolver implementation that looks up variables from the
+ * PageContext and also implements its implicit objects. It also
+ * wraps ELExceptions in JspExceptions that describe the attribute
+ * name and value causing the error.
+ *
+ * @author Nathan Abramson - Art Technology Group
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
+ **/
+
+public class Evaluator
+ implements ExpressionEvaluator
+{
+ //-------------------------------------
+ // Properties
+ //-------------------------------------
+
+ //-------------------------------------
+ // Member variables
+ //-------------------------------------
+
+ /** The singleton instance of the evaluator **/
+ static ELEvaluator sEvaluator =
+ new ELEvaluator
+ (new JSTLVariableResolver ());
+
+ //-------------------------------------
+ // ExpressionEvaluator methods
+ //-------------------------------------
+ /**
+ *
+ * Translation time validation of an attribute value. This method
+ * will return a null String if the attribute value is valid;
+ * otherwise an error message.
+ **/
+ public String validate (String pAttributeName,
+ String pAttributeValue)
+ {
+ try {
+ sEvaluator.parseExpressionString (pAttributeValue);
+ return null;
+ }
+ catch (ELException exc) {
+ return
+ MessageFormat.format
+ (Constants.ATTRIBUTE_PARSE_EXCEPTION,
+ new Object [] {
+ "" + pAttributeName,
+ "" + pAttributeValue,
+ exc.getMessage ()
+ });
+ }
+ }
+
+ //-------------------------------------
+ /**
+ *
+ * Evaluates the expression at request time
+ **/
+ public Object evaluate (String pAttributeName,
+ String pAttributeValue,
+ Class pExpectedType,
+ Tag pTag,
+ PageContext pPageContext)
+ throws JspException
+ {
+ try {
+ return sEvaluator.evaluate
+ (pAttributeValue,
+ pPageContext,
+ pExpectedType);
+ }
+ catch (ELException exc) {
+ return new JspException
+ (MessageFormat.format
+ (Constants.ATTRIBUTE_EVALUATION_EXCEPTION,
+ new Object [] {
+ "" + pAttributeName,
+ "" + pAttributeValue,
+ exc.getMessage ()
+ }));
+ }
+ }
+
+ //-------------------------------------
+ // Testing methods
+ //-------------------------------------
+ /**
+ *
+ * Parses the given attribute value, then converts it back to a
+ * String in its canonical form.
+ **/
+ public static String parseAndRender (String pAttributeValue)
+ throws JspException
+ {
+ try {
+ return sEvaluator.parseAndRender (pAttributeValue);
+ }
+ catch (ELException exc) {
+ throw new JspException
+ (MessageFormat.format
+ (Constants.ATTRIBUTE_PARSE_EXCEPTION,
+ new Object [] {
+ "test",
+ "" + pAttributeValue,
+ exc.getMessage ()
+ }));
+ }
+ }
+
+ //-------------------------------------
+
+}
1.2 +3 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/Expression.java
Index: Expression.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/Expression.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Expression.java 5 Mar 2002 14:10:43 -0000 1.1
+++ Expression.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,16 +55,13 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The abstract class from which all expression types
* derive.
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public abstract class Expression
@@ -85,9 +82,10 @@
*
* Evaluates the expression in the given context
**/
- public abstract Object evaluate (PageContext pContext,
+ public abstract Object evaluate (Object pContext,
+ VariableResolver pResolver,
Logger pLogger)
- throws JspException;
+ throws ELException;
//-------------------------------------
1.2 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/GreaterThanOperator.java
Index: GreaterThanOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/GreaterThanOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- GreaterThanOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ GreaterThanOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the greater than operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class GreaterThanOperator
@@ -104,9 +101,9 @@
**/
public Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
if (pLeft == pRight) {
return Boolean.FALSE;
1.2 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/GreaterThanOrEqualsOperator.java
Index: GreaterThanOrEqualsOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/GreaterThanOrEqualsOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- GreaterThanOrEqualsOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ GreaterThanOrEqualsOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the greater than or equals operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class GreaterThanOrEqualsOperator
@@ -104,9 +101,9 @@
**/
public Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
if (pLeft == pRight) {
return Boolean.TRUE;
1.4 +0 -2 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java
Index: ImplicitObjects.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ImplicitObjects.java 7 Mar 2002 00:41:57 -0000 1.3
+++ ImplicitObjects.java 14 Apr 2002 14:32:35 -0000 1.4
@@ -62,8 +62,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.servlet.ServletContext;
-import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.PageContext;
@@ -74,7 +72,7 @@
* correct implicit object for a given implicit object name.
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class ImplicitObjects
1.2 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/IntegerDivideOperator.java
Index: IntegerDivideOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/IntegerDivideOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- IntegerDivideOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ IntegerDivideOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the integer divide operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class IntegerDivideOperator
@@ -104,9 +101,9 @@
**/
public Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
if (pLeft == null &&
pRight == null) {
1.2 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/LessThanOperator.java
Index: LessThanOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/LessThanOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LessThanOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ LessThanOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the less than operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class LessThanOperator
@@ -104,9 +101,9 @@
**/
public Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
if (pLeft == pRight) {
return Boolean.FALSE;
1.2 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/LessThanOrEqualsOperator.java
Index: LessThanOrEqualsOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/LessThanOrEqualsOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LessThanOrEqualsOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ LessThanOrEqualsOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the less than or equals operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class LessThanOrEqualsOperator
@@ -104,9 +101,9 @@
**/
public Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
if (pLeft == pRight) {
return Boolean.TRUE;
1.2 +3 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/Literal.java
Index: Literal.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/Literal.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Literal.java 5 Mar 2002 14:10:43 -0000 1.1
+++ Literal.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>An expression representing a literal value
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public abstract class Literal
@@ -97,9 +94,10 @@
*
* Evaluates to the literal value
**/
- public Object evaluate (PageContext pContext,
+ public Object evaluate (Object pContext,
+ VariableResolver pResolver,
Logger pLogger)
- throws JspException
+ throws ELException
{
return mValue;
}
1.3 +14 -19 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/Logger.java
Index: Logger.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/Logger.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Logger.java 5 Mar 2002 21:14:29 -0000 1.2
+++ Logger.java 14 Apr 2002 14:32:35 -0000 1.3
@@ -55,10 +55,8 @@
package org.apache.taglibs.standard.lang.jstl;
+import java.io.PrintStream;
import java.text.MessageFormat;
-import javax.servlet.ServletContext;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
/**
*
@@ -72,7 +70,7 @@
* but which should be reported to the developer.
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class Logger
@@ -81,16 +79,18 @@
// Member variables
//-------------------------------------
- PageContext mPageContext;
+ PrintStream mOut;
//-------------------------------------
/**
*
* Constructor
+ *
+ * @param pOut the PrintStream to which warnings should be printed
**/
- public Logger (PageContext pPageContext)
+ public Logger (PrintStream pOut)
{
- mPageContext = pPageContext;
+ mOut = pOut;
}
//-------------------------------------
@@ -114,19 +114,14 @@
throws ELException
{
if (isLoggingWarning ()) {
- if (mPageContext != null) {
- ServletContext sc = mPageContext.getServletContext ();
- if (sc != null) {
- if (pMessage == null) {
- sc.log ("", pRootCause);
- }
- else if (pRootCause == null) {
- sc.log (pMessage);
- }
- else {
- sc.log (pMessage, pRootCause);
- }
- }
+ if (pMessage == null) {
+ System.out.println (pRootCause);
+ }
+ else if (pRootCause == null) {
+ System.out.println (pMessage);
+ }
+ else {
+ System.out.println (pMessage + ": " + pRootCause);
}
}
}
1.2 +0 -3 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/MinusOperator.java
Index: MinusOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/MinusOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MinusOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ MinusOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the minus operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class MinusOperator
1.3 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ModulusOperator.java
Index: ModulusOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ModulusOperator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ModulusOperator.java 6 Mar 2002 07:46:48 -0000 1.2
+++ ModulusOperator.java 14 Apr 2002 14:32:35 -0000 1.3
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the modulus operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class ModulusOperator
@@ -104,9 +101,9 @@
**/
public Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
if (pLeft == null &&
pRight == null) {
1.2 +0 -3 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/MultiplyOperator.java
Index: MultiplyOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/MultiplyOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MultiplyOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ MultiplyOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the multiply operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class MultiplyOperator
1.3 +6 -14 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/NamedValue.java
Index: NamedValue.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/NamedValue.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- NamedValue.java 6 Mar 2002 07:46:48 -0000 1.2
+++ NamedValue.java 14 Apr 2002 14:32:35 -0000 1.3
@@ -55,16 +55,13 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>Represents a name that can be used as the first element of a
* value.
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class NamedValue
@@ -108,23 +105,18 @@
//-------------------------------------
/**
*
- * Evaluates by looking up the name as an attribute
+ * Evaluates by looking up the name in the VariableResolver
**/
- public Object evaluate (PageContext pContext,
+ public Object evaluate (Object pContext,
+ VariableResolver pResolver,
Logger pLogger)
- throws JspException
+ throws ELException
{
- Object ret = pContext.findAttribute (mName);
- if (ret == null) {
- if (pLogger.isLoggingWarning ()) {
- pLogger.logWarning
- (Constants.NAMED_VALUE_NOT_FOUND,
- mName);
- }
+ if (pResolver == null) {
return null;
}
else {
- return ret;
+ return pResolver.resolveVariable (mName, pContext);
}
}
1.2 +0 -3 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/NotEqualsOperator.java
Index: NotEqualsOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/NotEqualsOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NotEqualsOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ NotEqualsOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the not equals operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class NotEqualsOperator
1.2 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/NotOperator.java
Index: NotOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/NotOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NotOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ NotOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the not operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class NotOperator
@@ -103,9 +100,9 @@
* Applies the operator to the given value
**/
public Object apply (Object pValue,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
// Coerce the value to a boolean
boolean val = Coercions.coerceToBoolean (pValue, pLogger).booleanValue ();
1.3 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/OrOperator.java
Index: OrOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/OrOperator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- OrOperator.java 13 Mar 2002 22:47:19 -0000 1.2
+++ OrOperator.java 14 Apr 2002 14:32:35 -0000 1.3
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the or operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class OrOperator
@@ -104,9 +101,9 @@
**/
public Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
// Coerce the values to booleans
boolean left =
1.2 +0 -3 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/PlusOperator.java
Index: PlusOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/PlusOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PlusOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ PlusOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the plus operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class PlusOperator
1.2 +0 -2 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/PrimitiveObjects.java
Index: PrimitiveObjects.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/PrimitiveObjects.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PrimitiveObjects.java 5 Mar 2002 14:10:43 -0000 1.1
+++ PrimitiveObjects.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,8 +55,6 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>This converts primitive values to their Object counterparts.
@@ -64,7 +62,7 @@
* ints, and longs, values -1000 to 1000 are cached.
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
class PrimitiveObjects
1.2 +3 -4 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/PropertySuffix.java
Index: PropertySuffix.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/PropertySuffix.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PropertySuffix.java 5 Mar 2002 14:10:43 -0000 1.1
+++ PropertySuffix.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -58,8 +58,6 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Map;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
/**
*
@@ -68,7 +66,7 @@
* equivalent to a["b"]
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class PropertySuffix
@@ -101,9 +99,10 @@
*
* Gets the value of the index
**/
- Object evaluateIndex (PageContext pContext,
+ Object evaluateIndex (Object pContext,
+ VariableResolver pResolver,
Logger pLogger)
- throws JspException
+ throws ELException
{
return mName;
}
1.2 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/RelationalOperator.java
Index: RelationalOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/RelationalOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RelationalOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ RelationalOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,16 +55,13 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>This is the superclass for all relational operators (except ==
* or !=)
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public abstract class RelationalOperator
@@ -77,9 +74,9 @@
**/
public Object apply (Object pLeft,
Object pRight,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
return Coercions.applyRelationalOperator (pLeft, pRight, this, pLogger);
}
1.4 +7 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/Resources.properties
Index: Resources.properties
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/Resources.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Resources.properties 31 Mar 2002 16:41:57 -0000 1.3
+++ Resources.properties 14 Apr 2002 14:32:35 -0000 1.4
@@ -1,13 +1,12 @@
EXCEPTION_GETTING_BEANINFO=\
An Exception occurred getting the BeanInfo for class {0}
-NULL_ATTRIBUTE_VALUE=\
- A null attribute value string may not be passed to the \
+NULL_EXPRESSION_STRING=\
+ A null expression string may not be passed to the \
expression evaluator
PARSE_EXCEPTION=\
- Unable to parse custom action attribute "{2}" with value "{3}": \
- encountered "{1}", expected one of "{0}"
+ Encountered "{1}", expected one of [{0}]
CANT_GET_PROPERTY_OF_NULL=\
Attempt to get property "{0}" from a null value
@@ -124,7 +123,10 @@
No such implicit object "{0}" - the only implicit objects are: \
{1}
-EVALUATION_EXCEPTION=\
+ATTRIBUTE_EVALUATION_EXCEPTION=\
An error occurred while evaluating custom action attribute "{0}" \
with value "{1}": {2}
+ATTRIBUTE_PARSE_EXCEPTION=\
+ An error occurred while parsing custom action attribute "{0}" \
+ with value "{1}": {2}
1.3 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/UnaryMinusOperator.java
Index: UnaryMinusOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/UnaryMinusOperator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- UnaryMinusOperator.java 5 Mar 2002 21:14:29 -0000 1.2
+++ UnaryMinusOperator.java 14 Apr 2002 14:32:35 -0000 1.3
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>The implementation of the unary minus operator
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class UnaryMinusOperator
@@ -103,9 +100,9 @@
* Applies the operator to the given value
**/
public Object apply (Object pValue,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException
+ throws ELException
{
if (pValue == null) {
/*
1.2 +2 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/UnaryOperator.java
Index: UnaryOperator.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/UnaryOperator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UnaryOperator.java 5 Mar 2002 14:10:43 -0000 1.1
+++ UnaryOperator.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,15 +55,12 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>This is the superclass for all unary operators
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public abstract class UnaryOperator
@@ -92,9 +89,9 @@
* Applies the operator to the given value
**/
public abstract Object apply (Object pValue,
- PageContext pContext,
+ Object pContext,
Logger pLogger)
- throws JspException;
+ throws ELException;
//-------------------------------------
}
1.2 +4 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/UnaryOperatorExpression.java
Index: UnaryOperatorExpression.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/UnaryOperatorExpression.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UnaryOperatorExpression.java 5 Mar 2002 14:10:43 -0000 1.1
+++ UnaryOperatorExpression.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -56,8 +56,6 @@
package org.apache.taglibs.standard.lang.jstl;
import java.util.List;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
/**
*
@@ -65,7 +63,7 @@
* value
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class UnaryOperatorExpression
@@ -146,11 +144,12 @@
*
* Evaluates to the literal value
**/
- public Object evaluate (PageContext pContext,
+ public Object evaluate (Object pContext,
+ VariableResolver pResolver,
Logger pLogger)
- throws JspException
+ throws ELException
{
- Object value = mExpression.evaluate (pContext, pLogger);
+ Object value = mExpression.evaluate (pContext, pResolver, pLogger);
if (mOperator != null) {
value = mOperator.apply (value, pContext, pLogger);
}
1.2 +3 -5 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ValueSuffix.java
Index: ValueSuffix.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ValueSuffix.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ValueSuffix.java 5 Mar 2002 14:10:43 -0000 1.1
+++ ValueSuffix.java 14 Apr 2002 14:32:35 -0000 1.2
@@ -55,16 +55,13 @@
package org.apache.taglibs.standard.lang.jstl;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
-
/**
*
* <p>Represents an element that can appear as a suffix in a complex
* value, such as a property or index operator, or a function call.
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public abstract class ValueSuffix
@@ -83,9 +80,10 @@
* given value.
**/
public abstract Object evaluate (Object pValue,
- PageContext pContext,
+ Object pContext,
+ VariableResolver pResolver,
Logger pLogger)
- throws JspException;
+ throws ELException;
//-------------------------------------
}
1.1 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java
Index: ELEvaluator.java
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.taglibs.standard.lang.jstl;
import java.io.Reader;
import java.io.StringReader;
import java.text.MessageFormat;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.apache.taglibs.standard.lang.jstl.parser.ELParser;
import org.apache.taglibs.standard.lang.jstl.parser.ParseException;
import org.apache.taglibs.standard.lang.jstl.parser.Token;
import org.apache.taglibs.standard.lang.jstl.parser.TokenMgrError;
/**
*
* <p>This is the main class for evaluating expression Strings. An
* expression String is a String that may contain expressions of the
* form ${...}. Multiple expressions may appear in the same
* expression String. In such a case, the expression String's value
* is computed by concatenating the String values of those evaluated
* expressions and any intervening non-expression text, then
* converting the resulting String to the expected type using the
* PropertyEditor mechanism.
*
* <p>In the special case where the expression String is a single
* expression, the value of the expression String is determined by
* evaluating the expression, without any intervening conversion to a
* String.
*
* <p>The evaluator maintains a cache mapping expression Strings to
* their parsed results. For expression Strings containing no
* expression elements, it maintains a cache mapping
* ExpectedType/ExpressionString to parsed value, so that static
* expression Strings won't have to go through a conversion step every
* time they are used. All instances of the evaluator share the same
* cache. The cache may be bypassed by setting a flag on the
* evaluator's constructor.
*
* <p>The evaluator must be passed a VariableResolver in its
* constructor. The VariableResolver is used to resolve variable
* names encountered in expressions, and can also be used to implement
* "implicit objects" that are always present in the namespace.
* Different applications will have different policies for variable
* lookups and implicit objects - these differences can be
* encapsulated in the VariableResolver passed to the evaluator's
* constructor.
*
* <p>Most VariableResolvers will need to perform their resolution
* against some context. For example, a JSP environment needs a
* PageContext to resolve variables. The evaluate() method takes a
* generic Object context which is eventually passed to the
* VariableResolver - the VariableResolver is responsible for casting
* the context to the proper type.
*
* <p>Once an evaluator instance has been constructed, it may be used
* multiple times, and may be used by multiple simultaneous Threads.
* In other words, an evaluator instance is well-suited for use as a
* singleton.
*
* @author Nathan Abramson - Art Technology Group
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class ELEvaluator
{
//-------------------------------------
// Properties
//-------------------------------------
//-------------------------------------
// Member variables
//-------------------------------------
/** The mapping from expression String to its parsed form (String,
Expression, or ExpressionString) **/
static Map sCachedExpressionStrings =
Collections.synchronizedMap (new HashMap ());
/** The mapping from ExpectedType to Maps mapping literal String to
parsed value **/
static Map sCachedExpectedTypes = new HashMap ();
/** The static Logger **/
static Logger sLogger = new Logger (System.out);
/** The VariableResolver **/
VariableResolver mResolver;
/** Flag if the cache should be bypassed **/
boolean mBypassCache;
//-------------------------------------
/**
*
* Constructor
*
* @param pResolver the object that should be used to resolve
* variable names encountered in expressions. If null, all variable
* references will resolve to null.
**/
public ELEvaluator (VariableResolver pResolver)
{
mResolver = pResolver;
}
//-------------------------------------
/**
*
* Constructor
*
* @param pResolver the object that should be used to resolve
* variable names encountered in expressions. If null, all variable
* references will resolve to null.
*
* @param pBypassCache flag indicating if the cache should be
* bypassed
**/
public ELEvaluator (VariableResolver pResolver,
boolean pBypassCache)
{
mResolver = pResolver;
mBypassCache = pBypassCache;
}
//-------------------------------------
/**
*
* Evaluates the given expression String
*
* @param pExpressionString the expression String to be evaluated
* @param pContext the context passed to the VariableResolver for
* resolving variable names
* @param pExpectedType the type to which the evaluated expression
* should be coerced
* @return the expression String evaluated to the given expected
* type
**/
public Object evaluate (String pExpressionString,
Object pContext,
Class pExpectedType)
throws ELException
{
return evaluate (pExpressionString,
pContext,
pExpectedType,
sLogger);
}
//-------------------------------------
/**
*
* Evaluates the given expression string
**/
Object evaluate (String pExpressionString,
Object pContext,
Class pExpectedType,
Logger pLogger)
throws ELException
{
// Check for null expression strings
if (pExpressionString == null) {
throw new ELException
(Constants.NULL_EXPRESSION_STRING);
}
// Get the parsed version of the expression string
Object parsedValue = parseExpressionString (pExpressionString);
// Evaluate differently based on the parsed type
if (parsedValue instanceof String) {
// Convert the String, and cache the conversion
String strValue = (String) parsedValue;
return convertStaticValueToExpectedType (strValue,
pExpectedType,
pLogger);
}
else if (parsedValue instanceof Expression) {
// Evaluate the expression and convert
Object value =
((Expression) parsedValue).evaluate (pContext,
mResolver,
pLogger);
return convertToExpectedType (value,
pExpectedType,
pLogger);
}
else if (parsedValue instanceof ExpressionString) {
// Evaluate the expression/string list and convert
String strValue =
((ExpressionString) parsedValue).evaluate (pContext,
mResolver,
pLogger);
return convertToExpectedType (strValue,
pExpectedType,
pLogger);
}
else {
// This should never be reached
return null;
}
}
//-------------------------------------
/**
*
* Gets the parsed form of the given expression string. If the
* parsed form is cached (and caching is not bypassed), return the
* cached form, otherwise parse and cache the value. Returns either
* a String, Expression, or ExpressionString.
**/
public Object parseExpressionString (String pExpressionString)
throws ELException
{
// See if it's an empty String
if (pExpressionString.length () == 0) {
return "";
}
// See if it's in the cache
Object ret =
mBypassCache ?
null :
sCachedExpressionStrings.get (pExpressionString);
if (ret == null) {
// Parse the expression
Reader r = new StringReader (pExpressionString);
ELParser parser = new ELParser (r);
try {
ret = parser.ExpressionString ();
sCachedExpressionStrings.put (pExpressionString, ret);
}
catch (ParseException exc) {
throw new ELException
(formatParseException (pExpressionString,
exc));
}
catch (TokenMgrError exc) {
// Note - this should never be reached, since the parser is
// constructed to tokenize any input (illegal inputs get
// parsed to <BADLY_ESCAPED_STRING_LITERAL> or
// <ILLEGAL_CHARACTER>
throw new ELException (exc.getMessage ());
}
}
return ret;
}
//-------------------------------------
/**
*
* Converts the given value to the specified expected type.
**/
Object convertToExpectedType (Object pValue,
Class pExpectedType,
Logger pLogger)
throws ELException
{
return Coercions.coerce (pValue,
pExpectedType,
pLogger);
}
//-------------------------------------
/**
*
* Converts the given String, specified as a static expression
* string, to the given expected type. The conversion is cached.
**/
Object convertStaticValueToExpectedType (String pValue,
Class pExpectedType,
Logger pLogger)
throws ELException
{
// See if the value is already of the expected type
if (pExpectedType == String.class ||
pExpectedType == Object.class) {
return pValue;
}
// Find the cached value
Map valueByString = getOrCreateExpectedTypeMap (pExpectedType);
if (!mBypassCache &&
valueByString.containsKey (pValue)) {
return valueByString.get (pValue);
}
else {
// Convert from a String
Object ret = Coercions.coerce (pValue, pExpectedType, pLogger);
valueByString.put (pValue, ret);
return ret;
}
}
//-------------------------------------
/**
*
* Creates or returns the Map that maps string literals to parsed
* values for the specified expected type.
**/
static Map getOrCreateExpectedTypeMap (Class pExpectedType)
{
synchronized (sCachedExpectedTypes) {
Map ret = (Map) sCachedExpectedTypes.get (pExpectedType);
if (ret == null) {
ret = Collections.synchronizedMap (new HashMap ());
sCachedExpectedTypes.put (pExpectedType, ret);
}
return ret;
}
}
//-------------------------------------
// Formatting ParseException
//-------------------------------------
/**
*
* Formats a ParseException into an error message suitable for
* displaying on a web page
**/
static String formatParseException (String pExpressionString,
ParseException pExc)
{
// Generate the String of expected tokens
StringBuffer expectedBuf = new StringBuffer ();
int maxSize = 0;
boolean printedOne = false;
for (int i = 0; i < pExc.expectedTokenSequences.length; i++) {
if (maxSize < pExc.expectedTokenSequences [i].length) {
maxSize = pExc.expectedTokenSequences [i].length;
}
for (int j = 0; j < pExc.expectedTokenSequences [i].length; j++) {
if (printedOne) {
expectedBuf.append (", ");
}
expectedBuf.append
(pExc.tokenImage [pExc.expectedTokenSequences [i] [j]]);
printedOne = true;
}
}
String expected = expectedBuf.toString ();
// Generate the String of encountered tokens
StringBuffer encounteredBuf = new StringBuffer ();
Token tok = pExc.currentToken.next;
for (int i = 0; i < maxSize; i++) {
if (i != 0) encounteredBuf.append (" ");
if (tok.kind == 0) {
encounteredBuf.append (pExc.tokenImage [0]);
break;
}
encounteredBuf.append (addEscapes (tok.image));
tok = tok.next;
}
String encountered = encounteredBuf.toString ();
// Format the error message
return MessageFormat.format
(Constants.PARSE_EXCEPTION,
new Object [] {
expected,
encountered,
});
}
//-------------------------------------
/**
*
* Used to convert raw characters to their escaped version when
* these raw version cannot be used as part of an ASCII string
* literal.
**/
static String addEscapes (String str)
{
StringBuffer retval = new StringBuffer ();
char ch;
for (int i = 0; i < str.length (); i++) {
switch (str.charAt (i)) {
case 0 :
continue;
case '\b':
retval.append ("\\b");
continue;
case '\t':
retval.append ("\\t");
continue;
case '\n':
retval.append ("\\n");
continue;
case '\f':
retval.append ("\\f");
continue;
case '\r':
retval.append ("\\r");
continue;
default:
if ((ch = str.charAt (i)) < 0x20 || ch > 0x7e) {
String s = "0000" + Integer.toString (ch, 16);
retval.append ("\\u" + s.substring (s.length () - 4, s.length ()));
}
else {
retval.append (ch);
}
continue;
}
}
return retval.toString ();
}
//-------------------------------------
// Testing methods
//-------------------------------------
/**
*
* Parses the given expression string, then converts it back to a
* String in its canonical form. This is used to test parsing.
**/
public String parseAndRender (String pExpressionString)
throws ELException
{
Object val = parseExpressionString (pExpressionString);
if (val instanceof String) {
return (String) val;
}
else if (val instanceof Expression) {
return "${" + ((Expression) val).getExpressionString () + "}";
}
else if (val instanceof ExpressionString) {
return ((ExpressionString) val).getExpressionString ();
}
else {
return "";
}
}
//-------------------------------------
}
1.1 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ExpressionString.java
Index: ExpressionString.java
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.taglibs.standard.lang.jstl;
/**
*
* <p>Represents an expression String consisting of a mixture of
* Strings and Expressions.
*
* @author Nathan Abramson - Art Technology Group
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class ExpressionString
{
//-------------------------------------
// Properties
//-------------------------------------
// property elements
Object [] mElements;
public Object [] getElements ()
{ return mElements; }
public void setElements (Object [] pElements)
{ mElements = pElements; }
//-------------------------------------
/**
*
* Constructor
**/
public ExpressionString (Object [] pElements)
{
mElements = pElements;
}
//-------------------------------------
/**
*
* Evaluates the expression string by evaluating each element,
* converting it to a String (using toString, or "" for null values)
* and concatenating the results into a single String.
**/
public String evaluate (Object pContext,
VariableResolver pResolver,
Logger pLogger)
throws ELException
{
StringBuffer buf = new StringBuffer ();
for (int i = 0; i < mElements.length; i++) {
Object elem = mElements [i];
if (elem instanceof String) {
buf.append ((String) elem);
}
else if (elem instanceof Expression) {
Object val =
((Expression) elem).evaluate (pContext, pResolver, pLogger);
if (val != null) {
buf.append (val.toString ());
}
}
}
return buf.toString ();
}
//-------------------------------------
/**
*
* Returns the expression in the expression language syntax
**/
public String getExpressionString ()
{
StringBuffer buf = new StringBuffer ();
for (int i = 0; i < mElements.length; i++) {
Object elem = mElements [i];
if (elem instanceof String) {
buf.append ((String) elem);
}
else if (elem instanceof Expression) {
buf.append ("${");
buf.append (((Expression) elem).getExpressionString ());
buf.append ("}");
}
}
return buf.toString ();
}
//-------------------------------------
}
1.1 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/JSTLVariableResolver.java
Index: JSTLVariableResolver.java
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.taglibs.standard.lang.jstl;
import javax.servlet.jsp.PageContext;
/**
*
* <p>This is the JSTL-specific implementation of VariableResolver.
* It looks up variable references in the PageContext, and also
* recognizes references to implicit objects.
*
* @author Nathan Abramson - Art Technology Group
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class JSTLVariableResolver
implements VariableResolver
{
//-------------------------------------
/**
*
* Resolves the specified variable within the given context.
* Returns null if the variable is not found.
**/
public Object resolveVariable (String pName,
Object pContext)
throws ELException
{
PageContext ctx = (PageContext) pContext;
// Check for implicit objects
if ("pageContext".equals (pName)) {
return ctx;
}
else if ("page".equals (pName)) {
return ImplicitObjects.
getImplicitObjects (ctx).
getPageScopeMap ();
}
else if ("request".equals (pName)) {
return ImplicitObjects.
getImplicitObjects (ctx).
getRequestScopeMap ();
}
else if ("session".equals (pName)) {
return ImplicitObjects.
getImplicitObjects (ctx).
getSessionScopeMap ();
}
else if ("application".equals (pName)) {
return ImplicitObjects.
getImplicitObjects (ctx).
getApplicationScopeMap ();
}
else if ("param".equals (pName)) {
return ImplicitObjects.
getImplicitObjects (ctx).
getParamMap ();
}
else if ("params".equals (pName)) {
return ImplicitObjects.
getImplicitObjects (ctx).
getParamsMap ();
}
// Otherwise, just look it up in the page context
else {
return ctx.findAttribute (pName);
}
}
//-------------------------------------
}
1.1 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/VariableResolver.java
Index: VariableResolver.java
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.taglibs.standard.lang.jstl;
/**
*
* <p>This class is used to customize the way the evaluator resolves
* variable references. For example, instances of this class can
* implement their own variable lookup mechanisms, or introduce the
* notion of "implicit variables" which override any other variables.
* An instance of this class should be passed to the evaluator's
* constructor.
*
* <p>Whenever the evaluator is invoked, it is passed a "context"
* Object from the application. For example, in a JSP environment,
* the "context" is a PageContext. That context object is eventually
* passed to this class, so that this class has a context in which to
* resolve variables.
*
* @author Nathan Abramson - Art Technology Group
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public interface VariableResolver
{
//-------------------------------------
/**
*
* Resolves the specified variable within the given context.
* Returns null if the variable is not found.
**/
public Object resolveVariable (String pName,
Object pContext)
throws ELException;
//-------------------------------------
}
1.9 +20 -96 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/parser/ELParser.java
Index: ELParser.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/parser/ELParser.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ELParser.java 12 Apr 2002 11:28:42 -0000 1.8
+++ ELParser.java 14 Apr 2002 14:32:36 -0000 1.9
@@ -11,7 +11,7 @@
throws ParseException
{
ELParser parser = new ELParser (System.in);
- parser.AttributeValue ();
+ parser.ExpressionString ();
}
/*****************************************
@@ -20,11 +20,11 @@
/**
*
- * Returns a String if the attribute value is a single String, an
- * Expression if the attribute value is a single Expression, an
- * AttributeValue if it's a mixture of both.
+ * Returns a String if the expression string is a single String, an
+ * Expression if the expression string is a single Expression, an
+ * ExpressionString if it's a mixture of both.
**/
- final public Object AttributeValue() throws ParseException {
+ final public Object ExpressionString() throws ParseException {
Object ret = "";
List elems = null;
Object elem;
@@ -70,7 +70,7 @@
elems.add (elem);
}
if (elems != null) {
- ret = new AttributeValue (elems.toArray ());
+ ret = new ExpressionString (elems.toArray ());
}
{if (true) return ret;}
throw new Error("Missing return statement in function");
@@ -644,15 +644,6 @@
case IDENTIFIER:
ret = NamedValue();
break;
- case PAGE_CONTEXT:
- case PAGE:
- case REQUEST:
- case SESSION:
- case APPLICATION:
- case PARAM:
- case PARAMS:
- ret = ImplicitObject();
- break;
default:
jj_la1[27] = jj_gen;
jj_consume_token(-1);
@@ -780,86 +771,19 @@
final public String Identifier() throws ParseException {
Token t;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- t = jj_consume_token(IDENTIFIER);
- break;
- case PAGE_CONTEXT:
- t = jj_consume_token(PAGE_CONTEXT);
- break;
- case PAGE:
- t = jj_consume_token(PAGE);
- break;
- case REQUEST:
- t = jj_consume_token(REQUEST);
- break;
- case SESSION:
- t = jj_consume_token(SESSION);
- break;
- case APPLICATION:
- t = jj_consume_token(APPLICATION);
- break;
- case PARAM:
- t = jj_consume_token(PARAM);
- break;
- case PARAMS:
- t = jj_consume_token(PARAMS);
- break;
- default:
- jj_la1[31] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
+ t = jj_consume_token(IDENTIFIER);
{if (true) return t.image;}
throw new Error("Missing return statement in function");
}
- final public ImplicitObject ImplicitObject() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PAGE_CONTEXT:
- jj_consume_token(PAGE_CONTEXT);
- {if (true) return ImplicitObject.PAGE_CONTEXT;}
- break;
- case PAGE:
- jj_consume_token(PAGE);
- {if (true) return ImplicitObject.PAGE;}
- break;
- case REQUEST:
- jj_consume_token(REQUEST);
- {if (true) return ImplicitObject.REQUEST;}
- break;
- case SESSION:
- jj_consume_token(SESSION);
- {if (true) return ImplicitObject.SESSION;}
- break;
- case APPLICATION:
- jj_consume_token(APPLICATION);
- {if (true) return ImplicitObject.APPLICATION;}
- break;
- case PARAM:
- jj_consume_token(PARAM);
- {if (true) return ImplicitObject.PARAM;}
- break;
- case PARAMS:
- jj_consume_token(PARAMS);
- {if (true) return ImplicitObject.PARAMS;}
- break;
- default:
- jj_la1[32] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
public ELParserTokenManager token_source;
SimpleCharStream jj_input_stream;
public Token token, jj_nt;
private int jj_ntk;
private int jj_gen;
- final private int[] jj_la1 = new int[33];
- final private int[] jj_la1_0 = {0x6,0x6,0x6,0x0,0x0,0x0,0x0,0x18600000,0x600000,0x18000000,0x18600000,0x79e0000,0x180000,0x60000,0x6000000,0x1800000,0x79e0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80010000,0x20007580,0x80010000,0x7580,0x3000,0x0,0x0,};
- final private int[] jj_la1_1 = {0x0,0x0,0x0,0x3000,0x3000,0xc00,0xc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x6,0xf8,0x30,0xc0,0xf8,0x304,0x300,0x304,0x0,0x3fc000,0x0,0x0,0x0,0x3fc000,0x1fc000,};
+ final private int[] jj_la1 = new int[31];
+ final private int[] jj_la1_0 = {0x6,0x6,0x6,0x0,0x0,0x0,0x0,0x18600000,0x600000,0x18000000,0x18600000,0x79e0000,0x180000,0x60000,0x6000000,0x1800000,0x79e0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80010000,0x20007580,0x80010000,0x7580,0x3000,};
+ final private int[] jj_la1_1 = {0x0,0x0,0x0,0x3000,0x3000,0xc00,0xc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x6,0xf8,0x30,0xc0,0xf8,0x304,0x300,0x304,0x0,0x4000,0x0,0x0,0x0,};
public ELParser(java.io.InputStream stream) {
jj_input_stream = new SimpleCharStream(stream, 1, 1);
@@ -867,7 +791,7 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 33; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 31; i++) jj_la1[i] = -1;
}
public void ReInit(java.io.InputStream stream) {
@@ -876,7 +800,7 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 33; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 31; i++) jj_la1[i] = -1;
}
public ELParser(java.io.Reader stream) {
@@ -885,7 +809,7 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 33; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 31; i++) jj_la1[i] = -1;
}
public void ReInit(java.io.Reader stream) {
@@ -894,7 +818,7 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 33; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 31; i++) jj_la1[i] = -1;
}
public ELParser(ELParserTokenManager tm) {
@@ -902,7 +826,7 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 33; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 31; i++) jj_la1[i] = -1;
}
public void ReInit(ELParserTokenManager tm) {
@@ -910,7 +834,7 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 33; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 31; i++) jj_la1[i] = -1;
}
final private Token jj_consume_token(int kind) throws ParseException {
@@ -957,15 +881,15 @@
final public ParseException generateParseException() {
jj_expentries.removeAllElements();
- boolean[] la1tokens = new boolean[58];
- for (int i = 0; i < 58; i++) {
+ boolean[] la1tokens = new boolean[51];
+ for (int i = 0; i < 51; i++) {
la1tokens[i] = false;
}
if (jj_kind >= 0) {
la1tokens[jj_kind] = true;
jj_kind = -1;
}
- for (int i = 0; i < 33; i++) {
+ for (int i = 0; i < 31; i++) {
if (jj_la1[i] == jj_gen) {
for (int j = 0; j < 32; j++) {
if ((jj_la1_0[i] & (1<<j)) != 0) {
@@ -977,7 +901,7 @@
}
}
}
- for (int i = 0; i < 58; i++) {
+ for (int i = 0; i < 51; i++) {
if (la1tokens[i]) {
jj_expentry = new int[1];
jj_expentry[0] = i;
1.7 +5 -19 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/parser/ELParserConstants.java
Index: ELParserConstants.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/parser/ELParserConstants.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ELParserConstants.java 12 Apr 2002 11:28:42 -0000 1.6
+++ ELParserConstants.java 14 Apr 2002 14:32:36 -0000 1.7
@@ -45,18 +45,11 @@
int AND2 = 43;
int OR1 = 44;
int OR2 = 45;
- int PAGE_CONTEXT = 46;
- int PAGE = 47;
- int REQUEST = 48;
- int SESSION = 49;
- int APPLICATION = 50;
- int PARAM = 51;
- int PARAMS = 52;
- int IDENTIFIER = 53;
- int IMPL_OBJ_START = 54;
- int LETTER = 55;
- int DIGIT = 56;
- int ILLEGAL_CHARACTER = 57;
+ int IDENTIFIER = 46;
+ int IMPL_OBJ_START = 47;
+ int LETTER = 48;
+ int DIGIT = 49;
+ int ILLEGAL_CHARACTER = 50;
int DEFAULT = 0;
int IN_EXPRESSION = 1;
@@ -108,13 +101,6 @@
"\"&&\"",
"\"or\"",
"\"||\"",
- "\"pageContext\"",
- "\"page\"",
- "\"request\"",
- "\"session\"",
- "\"application\"",
- "\"param\"",
- "\"params\"",
"<IDENTIFIER>",
"\"#\"",
"<LETTER>",
1.9 +32 -265 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/parser/ELParserTokenManager.java
Index: ELParserTokenManager.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/parser/ELParserTokenManager.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ELParserTokenManager.java 12 Apr 2002 11:28:42 -0000 1.8
+++ ELParserTokenManager.java 14 Apr 2002 14:32:36 -0000 1.9
@@ -220,18 +220,18 @@
case 0:
if ((active0 & 0x10000L) != 0L)
return 1;
- if ((active0 & 0x1fd5a015547000L) != 0L)
+ if ((active0 & 0x15a015547000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 46;
return 6;
}
return -1;
case 1:
if ((active0 & 0x100015540000L) != 0L)
return 6;
- if ((active0 & 0x1fc5a000007000L) != 0L)
+ if ((active0 & 0x5a000007000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 46;
jjmatchedPos = 1;
return 6;
}
@@ -239,80 +239,20 @@
case 2:
if ((active0 & 0x5a000000000L) != 0L)
return 6;
- if ((active0 & 0x1fc00000007000L) != 0L)
+ if ((active0 & 0x7000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 46;
jjmatchedPos = 2;
return 6;
}
return -1;
case 3:
- if ((active0 & 0xc00000005000L) != 0L)
+ if ((active0 & 0x5000L) != 0L)
return 6;
- if ((active0 & 0x1f000000002000L) != 0L)
- {
- if (jjmatchedPos != 3)
- {
- jjmatchedKind = 53;
- jjmatchedPos = 3;
- }
- return 6;
- }
- return -1;
- case 4:
- if ((active0 & 0x18000000002000L) != 0L)
- return 6;
- if ((active0 & 0x7400000000000L) != 0L)
- {
- if (jjmatchedPos != 4)
- {
- jjmatchedKind = 53;
- jjmatchedPos = 4;
- }
- return 6;
- }
- return -1;
- case 5:
- if ((active0 & 0x10000000000000L) != 0L)
- return 6;
- if ((active0 & 0x7400000000000L) != 0L)
- {
- jjmatchedKind = 53;
- jjmatchedPos = 5;
- return 6;
- }
- return -1;
- case 6:
- if ((active0 & 0x4400000000000L) != 0L)
- {
- jjmatchedKind = 53;
- jjmatchedPos = 6;
- return 6;
- }
- if ((active0 & 0x3000000000000L) != 0L)
- return 6;
- return -1;
- case 7:
- if ((active0 & 0x4400000000000L) != 0L)
- {
- jjmatchedKind = 53;
- jjmatchedPos = 7;
- return 6;
- }
- return -1;
- case 8:
- if ((active0 & 0x4400000000000L) != 0L)
- {
- jjmatchedKind = 53;
- jjmatchedPos = 8;
- return 6;
- }
- return -1;
- case 9:
- if ((active0 & 0x4400000000000L) != 0L)
+ if ((active0 & 0x2000L) != 0L)
{
- jjmatchedKind = 53;
- jjmatchedPos = 9;
+ jjmatchedKind = 46;
+ jjmatchedPos = 3;
return 6;
}
return -1;
@@ -370,7 +310,7 @@
case 93:
return jjStopAtPos(0, 32);
case 97:
- return jjMoveStringLiteralDfa1_1(0x4040000000000L);
+ return jjMoveStringLiteralDfa1_1(0x40000000000L);
case 100:
return jjMoveStringLiteralDfa1_1(0x2000000000L);
case 101:
@@ -387,12 +327,6 @@
return jjMoveStringLiteralDfa1_1(0x10010004000L);
case 111:
return jjMoveStringLiteralDfa1_1(0x100000000000L);
- case 112:
- return jjMoveStringLiteralDfa1_1(0x18c00000000000L);
- case 114:
- return jjMoveStringLiteralDfa1_1(0x1000000000000L);
- case 115:
- return jjMoveStringLiteralDfa1_1(0x2000000000000L);
case 116:
return jjMoveStringLiteralDfa1_1(0x1000L);
case 124:
@@ -427,7 +361,7 @@
return jjStopAtPos(1, 27);
break;
case 97:
- return jjMoveStringLiteralDfa2_1(active0, 0x18c00000002000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x2000L);
case 101:
if ((active0 & 0x1000000L) != 0L)
return jjStartNfaWithStates_1(1, 24, 6);
@@ -435,15 +369,13 @@
return jjStartNfaWithStates_1(1, 26, 6);
else if ((active0 & 0x10000000L) != 0L)
return jjStartNfaWithStates_1(1, 28, 6);
- return jjMoveStringLiteralDfa2_1(active0, 0x3000000000000L);
+ break;
case 105:
return jjMoveStringLiteralDfa2_1(active0, 0x2000000000L);
case 110:
return jjMoveStringLiteralDfa2_1(active0, 0x40000000000L);
case 111:
return jjMoveStringLiteralDfa2_1(active0, 0x18000000000L);
- case 112:
- return jjMoveStringLiteralDfa2_1(active0, 0x4000000000000L);
case 113:
if ((active0 & 0x400000L) != 0L)
return jjStartNfaWithStates_1(1, 22, 6);
@@ -486,18 +418,8 @@
else if ((active0 & 0x40000000000L) != 0L)
return jjStartNfaWithStates_1(2, 42, 6);
break;
- case 103:
- return jjMoveStringLiteralDfa3_1(active0, 0xc00000000000L);
case 108:
return jjMoveStringLiteralDfa3_1(active0, 0x6000L);
- case 112:
- return jjMoveStringLiteralDfa3_1(active0, 0x4000000000000L);
- case 113:
- return jjMoveStringLiteralDfa3_1(active0, 0x1000000000000L);
- case 114:
- return jjMoveStringLiteralDfa3_1(active0, 0x18000000000000L);
- case 115:
- return jjMoveStringLiteralDfa3_1(active0, 0x2000000000000L);
case 116:
if ((active0 & 0x10000000000L) != 0L)
return jjStartNfaWithStates_1(2, 40, 6);
@@ -524,25 +446,16 @@
}
switch(curChar)
{
- case 97:
- return jjMoveStringLiteralDfa4_1(active0, 0x18000000000000L);
case 101:
if ((active0 & 0x1000L) != 0L)
return jjStartNfaWithStates_1(3, 12, 6);
- else if ((active0 & 0x800000000000L) != 0L)
- {
- jjmatchedKind = 47;
- jjmatchedPos = 3;
- }
- return jjMoveStringLiteralDfa4_1(active0, 0x400000000000L);
+ break;
case 108:
if ((active0 & 0x4000L) != 0L)
return jjStartNfaWithStates_1(3, 14, 6);
- return jjMoveStringLiteralDfa4_1(active0, 0x4000000000000L);
+ break;
case 115:
- return jjMoveStringLiteralDfa4_1(active0, 0x2000000002000L);
- case 117:
- return jjMoveStringLiteralDfa4_1(active0, 0x1000000000000L);
+ return jjMoveStringLiteralDfa4_1(active0, 0x2000L);
default :
break;
}
@@ -559,157 +472,14 @@
}
switch(curChar)
{
- case 67:
- return jjMoveStringLiteralDfa5_1(active0, 0x400000000000L);
case 101:
if ((active0 & 0x2000L) != 0L)
return jjStartNfaWithStates_1(4, 13, 6);
- return jjMoveStringLiteralDfa5_1(active0, 0x1000000000000L);
- case 105:
- return jjMoveStringLiteralDfa5_1(active0, 0x6000000000000L);
- case 109:
- if ((active0 & 0x8000000000000L) != 0L)
- {
- jjmatchedKind = 51;
- jjmatchedPos = 4;
- }
- return jjMoveStringLiteralDfa5_1(active0, 0x10000000000000L);
- default :
- break;
- }
- return jjStartNfa_1(3, active0);
-}
-private final int jjMoveStringLiteralDfa5_1(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(3, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_1(4, active0);
- return 5;
- }
- switch(curChar)
- {
- case 99:
- return jjMoveStringLiteralDfa6_1(active0, 0x4000000000000L);
- case 111:
- return jjMoveStringLiteralDfa6_1(active0, 0x2400000000000L);
- case 115:
- if ((active0 & 0x10000000000000L) != 0L)
- return jjStartNfaWithStates_1(5, 52, 6);
- return jjMoveStringLiteralDfa6_1(active0, 0x1000000000000L);
- default :
break;
- }
- return jjStartNfa_1(4, active0);
-}
-private final int jjMoveStringLiteralDfa6_1(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(4, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_1(5, active0);
- return 6;
- }
- switch(curChar)
- {
- case 97:
- return jjMoveStringLiteralDfa7_1(active0, 0x4000000000000L);
- case 110:
- if ((active0 & 0x2000000000000L) != 0L)
- return jjStartNfaWithStates_1(6, 49, 6);
- return jjMoveStringLiteralDfa7_1(active0, 0x400000000000L);
- case 116:
- if ((active0 & 0x1000000000000L) != 0L)
- return jjStartNfaWithStates_1(6, 48, 6);
- break;
- default :
- break;
- }
- return jjStartNfa_1(5, active0);
-}
-private final int jjMoveStringLiteralDfa7_1(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(5, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_1(6, active0);
- return 7;
- }
- switch(curChar)
- {
- case 116:
- return jjMoveStringLiteralDfa8_1(active0, 0x4400000000000L);
- default :
- break;
- }
- return jjStartNfa_1(6, active0);
-}
-private final int jjMoveStringLiteralDfa8_1(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(6, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_1(7, active0);
- return 8;
- }
- switch(curChar)
- {
- case 101:
- return jjMoveStringLiteralDfa9_1(active0, 0x400000000000L);
- case 105:
- return jjMoveStringLiteralDfa9_1(active0, 0x4000000000000L);
- default :
- break;
- }
- return jjStartNfa_1(7, active0);
-}
-private final int jjMoveStringLiteralDfa9_1(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(7, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_1(8, active0);
- return 9;
- }
- switch(curChar)
- {
- case 111:
- return jjMoveStringLiteralDfa10_1(active0, 0x4000000000000L);
- case 120:
- return jjMoveStringLiteralDfa10_1(active0, 0x400000000000L);
default :
break;
}
- return jjStartNfa_1(8, active0);
-}
-private final int jjMoveStringLiteralDfa10_1(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(8, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_1(9, active0);
- return 10;
- }
- switch(curChar)
- {
- case 110:
- if ((active0 & 0x4000000000000L) != 0L)
- return jjStartNfaWithStates_1(10, 50, 6);
- break;
- case 116:
- if ((active0 & 0x400000000000L) != 0L)
- return jjStartNfaWithStates_1(10, 46, 6);
- break;
- default :
- break;
- }
- return jjStartNfa_1(9, active0);
+ return jjStartNfa_1(3, active0);
}
static final long[] jjbitVec1 = {
0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L
@@ -757,8 +527,8 @@
}
else if ((0x1800000000L & l) != 0L)
{
- if (kind > 53)
- kind = 53;
+ if (kind > 46)
+ kind = 46;
jjCheckNAdd(6);
}
else if (curChar == 39)
@@ -789,15 +559,15 @@
case 5:
if ((0x1800000000L & l) == 0L)
break;
- if (kind > 53)
- kind = 53;
+ if (kind > 46)
+ kind = 46;
jjCheckNAdd(6);
break;
case 6:
if ((0x3ff001000000000L & l) == 0L)
break;
- if (kind > 53)
- kind = 53;
+ if (kind > 46)
+ kind = 46;
jjCheckNAdd(6);
break;
case 7:
@@ -921,8 +691,8 @@
case 6:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
- if (kind > 53)
- kind = 53;
+ if (kind > 46)
+ kind = 46;
jjCheckNAdd(6);
break;
case 2:
@@ -1001,8 +771,8 @@
case 6:
if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
break;
- if (kind > 53)
- kind = 53;
+ if (kind > 46)
+ kind = 46;
jjCheckNAdd(6);
break;
case 20:
@@ -1083,10 +853,7 @@
"\74", "\154\164", "\75\75", "\145\161", "\74\75", "\154\145", "\76\75", "\147\145",
"\41\75", "\156\145", "\50", "\51", "\133", "\135", "\53", "\55", "\52", "\57",
"\144\151\166", "\45", "\155\157\144", "\156\157\164", "\41", "\141\156\144", "\46\46",
-"\157\162", "\174\174", "\160\141\147\145\103\157\156\164\145\170\164",
-"\160\141\147\145", "\162\145\161\165\145\163\164", "\163\145\163\163\151\157\156",
-"\141\160\160\154\151\143\141\164\151\157\156", "\160\141\162\141\155", "\160\141\162\141\155\163", null, null, null, null,
-null, };
+"\157\162", "\174\174", null, null, null, null, null, };
public static final String[] lexStateNames = {
"DEFAULT",
"IN_EXPRESSION",
@@ -1094,10 +861,10 @@
public static final int[] jjnewLexState = {
-1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
+ -1,
};
static final long[] jjtoToken = {
- 0x23ffffffffffd87L,
+ 0x47ffffffffd87L,
};
static final long[] jjtoSkip = {
0x78L,
@@ -1201,9 +968,9 @@
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_1();
- if (jjmatchedPos == 0 && jjmatchedKind > 57)
+ if (jjmatchedPos == 0 && jjmatchedKind > 50)
{
- jjmatchedKind = 57;
+ jjmatchedKind = 50;
}
break;
}
1.3 +2 -2 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/EvaluationTest.java
Index: EvaluationTest.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/EvaluationTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- EvaluationTest.java 20 Mar 2002 13:51:59 -0000 1.2
+++ EvaluationTest.java 14 Apr 2002 14:32:37 -0000 1.3
@@ -138,7 +138,7 @@
Class cl = parseClassName (typeStr);
pOut.println ("ExpectedType: " + cl);
Evaluator e = new Evaluator ();
- Object val = e.evaluate ("test", str, context, cl);
+ Object val = e.evaluate ("test", str, cl, null, context);
pOut.println ("Evaluates to: " + val);
if (val != null) {
pOut.println ("With type: " + val.getClass ().getName ());
1.2 +1 -2 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/ParserTest.java
Index: ParserTest.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/ParserTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ParserTest.java 5 Mar 2002 14:10:46 -0000 1.1
+++ ParserTest.java 14 Apr 2002 14:32:37 -0000 1.2
@@ -66,7 +66,6 @@
import java.io.PrintStream;
import javax.servlet.jsp.JspException;
import org.apache.taglibs.standard.lang.jstl.Evaluator;
-import org.apache.taglibs.standard.lang.jstl.ELException;
/**
*
@@ -82,7 +81,7 @@
* testing.
*
* @author Nathan Abramson - Art Technology Group
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: shawn $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: arista $
**/
public class ParserTest
@@ -128,7 +127,7 @@
pOut.println ("Parses to: " + result);
}
catch (JspException exc) {
- pOut.println ("Causes an error: " + exc);
+ pOut.println ("Causes an error: " + exc.getMessage ());
}
}
}
1.3 +23 -31 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/evaluationTests.txt
Index: evaluationTests.txt
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/evaluationTests.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- evaluationTests.txt 13 Mar 2002 22:47:19 -0000 1.2
+++ evaluationTests.txt 14 Apr 2002 14:32:37 -0000 1.3
@@ -75,49 +75,49 @@
# looking up objects in scopes
# val1a - defined in page scope
-${page:val1a}
+${page.val1a}
java.lang.String
-${request:val1a}
+${request.val1a}
java.lang.String
-${session:val1a}
+${session.val1a}
java.lang.String
-${app:val1a}
+${application.val1a}
java.lang.String
${val1a}
java.lang.String
# val1b - defined in request scope
-${page:val1b}
+${page.val1b}
java.lang.String
-${request:val1b}
+${request.val1b}
java.lang.String
-${session:val1b}
+${session.val1b}
java.lang.String
-${app:val1b}
+${application.val1b}
java.lang.String
${val1b}
java.lang.String
# val1c - defined in session scope
-${page:val1c}
+${page.val1c}
java.lang.String
-${request:val1c}
+${request.val1c}
java.lang.String
-${session:val1c}
+${session.val1c}
java.lang.String
-${app:val1c}
+${application.val1c}
java.lang.String
${val1c}
java.lang.String
# val1d - defined in application scope
-${page:val1d}
+${page.val1d}
java.lang.String
-${request:val1d}
+${request.val1d}
java.lang.String
-${session:val1d}
+${session.val1d}
java.lang.String
-${app:val1d}
+${application.val1d}
java.lang.String
${val1d}
java.lang.String
@@ -517,14 +517,6 @@
java.lang.Object
${instanceof}
java.lang.Object
-${page}
-java.lang.Object
-${request}
-java.lang.Object
-${session}
-java.lang.Object
-${app}
-java.lang.Object
${true}
java.lang.Object
${false}
@@ -562,7 +554,7 @@
java.lang.Object
${bean1a.session}
java.lang.Object
-${bean1a.app}
+${bean1a.application}
java.lang.Object
${bean1a.true}
java.lang.Object
@@ -715,23 +707,23 @@
${ 4 eq 3}
java.lang.Object
-${ 4 neq 3}
+${ 4 ne 3}
java.lang.Object
${ 4 eq 4}
java.lang.Object
-${ 4 neq 4}
+${ 4 ne 4}
java.lang.Object
${ 4 lt 3}
java.lang.Object
${ 4 gt 3}
java.lang.Object
-${ 4 lte 3}
+${ 4 le 3}
java.lang.Object
-${ 4 gte 3}
+${ 4 ge 3}
java.lang.Object
-${ 4 lte 4}
+${ 4 le 4}
java.lang.Object
-${ 4 gte 4}
+${ 4 ge 4}
java.lang.Object
#######################################################
1.4 +239 -945 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/evaluationTestsOutput.txt
Index: evaluationTestsOutput.txt
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/evaluationTestsOutput.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- evaluationTestsOutput.txt 20 Mar 2002 13:51:59 -0000 1.3
+++ evaluationTestsOutput.txt 14 Apr 2002 14:32:37 -0000 1.4
@@ -129,10 +129,14 @@
Expression: ${false < true}
ExpectedType: class java.lang.Object
-Causes an error: Attempt to apply operator "<" to arguments of type "java.lang.Boolean" and "java.lang.Boolean"
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${false < true}": Attempt to apply operator "<" to arguments of type "java.lang.Boolean" and "java.lang.Boolean"
+With type: javax.servlet.jsp.JspException
+
Expression: ${false > true}
ExpectedType: class java.lang.Object
-Causes an error: Attempt to apply operator ">" to arguments of type "java.lang.Boolean" and "java.lang.Boolean"
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${false > true}": Attempt to apply operator ">" to arguments of type "java.lang.Boolean" and "java.lang.Boolean"
+With type: javax.servlet.jsp.JspException
+
Expression: ${true >= true}
ExpectedType: class java.lang.Object
Evaluates to: true
@@ -158,114 +162,26 @@
# looking up objects in scopes
# val1a - defined in page scope
-Expression: ${page:val1a}
+Expression: ${page.val1a}
+ExpectedType: class java.lang.String
+Evaluates to: page-scoped1
+With type: java.lang.String
+
+Expression: ${request.val1a}
+ExpectedType: class java.lang.String
+Evaluates to:
+With type: java.lang.String
+
+Expression: ${session.val1a}
ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 7.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${request:val1a}
-ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 10.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${session:val1a}
-ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 10.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${app:val1a}
-ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 6.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
+Evaluates to:
+With type: java.lang.String
+
+Expression: ${application.val1a}
+ExpectedType: class java.lang.String
+Evaluates to:
+With type: java.lang.String
+
Expression: ${val1a}
ExpectedType: class java.lang.String
Evaluates to: page-scoped1
@@ -273,114 +189,26 @@
# val1b - defined in request scope
-Expression: ${page:val1b}
+Expression: ${page.val1b}
+ExpectedType: class java.lang.String
+Evaluates to:
+With type: java.lang.String
+
+Expression: ${request.val1b}
ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 7.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${request:val1b}
-ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 10.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${session:val1b}
-ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 10.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${app:val1b}
-ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 6.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
+Evaluates to: request-scoped1
+With type: java.lang.String
+
+Expression: ${session.val1b}
+ExpectedType: class java.lang.String
+Evaluates to:
+With type: java.lang.String
+
+Expression: ${application.val1b}
+ExpectedType: class java.lang.String
+Evaluates to:
+With type: java.lang.String
+
Expression: ${val1b}
ExpectedType: class java.lang.String
Evaluates to: request-scoped1
@@ -388,114 +216,26 @@
# val1c - defined in session scope
-Expression: ${page:val1c}
+Expression: ${page.val1c}
+ExpectedType: class java.lang.String
+Evaluates to:
+With type: java.lang.String
+
+Expression: ${request.val1c}
ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 7.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${request:val1c}
-ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 10.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${session:val1c}
-ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 10.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${app:val1c}
-ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 6.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
+Evaluates to:
+With type: java.lang.String
+
+Expression: ${session.val1c}
+ExpectedType: class java.lang.String
+Evaluates to: session-scoped1
+With type: java.lang.String
+
+Expression: ${application.val1c}
+ExpectedType: class java.lang.String
+Evaluates to:
+With type: java.lang.String
+
Expression: ${val1c}
ExpectedType: class java.lang.String
Evaluates to: session-scoped1
@@ -503,114 +243,26 @@
# val1d - defined in application scope
-Expression: ${page:val1d}
+Expression: ${page.val1d}
+ExpectedType: class java.lang.String
+Evaluates to:
+With type: java.lang.String
+
+Expression: ${request.val1d}
ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 7.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${request:val1d}
-ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 10.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${session:val1d}
-ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 10.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${app:val1d}
-ExpectedType: class java.lang.String
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered ":" at line 1, column 6.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
+Evaluates to:
+With type: java.lang.String
+
+Expression: ${session.val1d}
+ExpectedType: class java.lang.String
+Evaluates to:
+With type: java.lang.String
+
+Expression: ${application.val1d}
+ExpectedType: class java.lang.String
+Evaluates to: app-scoped1
+With type: java.lang.String
+
Expression: ${val1d}
ExpectedType: class java.lang.String
Evaluates to: app-scoped1
@@ -1201,7 +853,9 @@
Expression: ${bean1a.bean1 < 14}
ExpectedType: boolean
-Causes an error: Attempt to coerce a value of type "org.apache.taglibs.standard.lang.jstl.test.Bean1" to type "java.lang.Long"
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.bean1 < 14}": Attempt to coerce a value of type "org.apache.taglibs.standard.lang.jstl.test.Bean1" to type "java.lang.Long"
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.bean1 == "hello"}
ExpectedType: boolean
Evaluates to: false
@@ -1260,13 +914,19 @@
Expression: ${bean1a.noProperty}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "noProperty" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.noProperty}": Unable to find a value for "noProperty" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.noGetter}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "noGetter" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.noGetter}": Unable to find a value for "noGetter" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.errorInGetter}
ExpectedType: class java.lang.Object
-Causes an error: An error occurred while getting property "errorInGetter" from an instance of class org.apache.taglibs.standard.lang.jstl.test.Bean1: java.lang.NullPointerException: Error!
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.errorInGetter}": An error occurred while getting property "errorInGetter" from an instance of class org.apache.taglibs.standard.lang.jstl.test.Bean1
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.bean2.string2}
ExpectedType: class java.lang.Object
Evaluates to: null
@@ -1367,10 +1027,14 @@
Expression: badvalue
ExpectedType: class org.apache.taglibs.standard.lang.jstl.test.Bean2
-Causes an error: Unable to parse value "badvalue" into expected type "org.apache.taglibs.standard.lang.jstl.test.Bean2": java.lang.IllegalArgumentException: Bad value badvalue
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "badvalue": Unable to parse value "badvalue" into expected type "org.apache.taglibs.standard.lang.jstl.test.Bean2"
+With type: javax.servlet.jsp.JspException
+
Expression: hello
ExpectedType: class org.apache.taglibs.standard.lang.jstl.test.Bean1
-Causes an error: Attempt to convert String "hello" to type "org.apache.taglibs.standard.lang.jstl.test.Bean1", but there is no PropertyEditor for that type
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "hello": Attempt to convert String "hello" to type "org.apache.taglibs.standard.lang.jstl.test.Bean1", but there is no PropertyEditor for that type
+With type: javax.servlet.jsp.JspException
+
#######################################################
# test null values bumped up to constants
@@ -1462,186 +1126,50 @@
Expression: ${and}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "and" at line 1, column 3.
-Was expecting one of:
- <INTEGER_LITERAL> ...
- <FLOATING_POINT_LITERAL> ...
- <STRING_LITERAL> ...
- "true" ...
- "false" ...
- "null" ...
- "(" ...
- "-" ...
- "not" ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${and}": Encountered "and", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${or}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "or" at line 1, column 3.
-Was expecting one of:
- <INTEGER_LITERAL> ...
- <FLOATING_POINT_LITERAL> ...
- <STRING_LITERAL> ...
- "true" ...
- "false" ...
- "null" ...
- "(" ...
- "-" ...
- "not" ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${or}": Encountered "or", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${not}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "}" at line 1, column 6.
-Was expecting one of:
- <INTEGER_LITERAL> ...
- <FLOATING_POINT_LITERAL> ...
- <STRING_LITERAL> ...
- "true" ...
- "false" ...
- "null" ...
- "(" ...
- "-" ...
- "not" ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${not}": Encountered "}", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${eq}
ExpectedType: class java.lang.Object
-Evaluates to: null
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${eq}": Encountered "eq", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
Expression: ${ne}
ExpectedType: class java.lang.Object
-Evaluates to: null
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${ne}": Encountered "ne", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
Expression: ${lt}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "lt" at line 1, column 3.
-Was expecting one of:
- <INTEGER_LITERAL> ...
- <FLOATING_POINT_LITERAL> ...
- <STRING_LITERAL> ...
- "true" ...
- "false" ...
- "null" ...
- "(" ...
- "-" ...
- "not" ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
-Expression: ${gt}
-ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "gt" at line 1, column 3.
-Was expecting one of:
- <INTEGER_LITERAL> ...
- <FLOATING_POINT_LITERAL> ...
- <STRING_LITERAL> ...
- "true" ...
- "false" ...
- "null" ...
- "(" ...
- "-" ...
- "not" ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
-Expression: ${le}
-ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "le" at line 1, column 3.
-Was expecting one of:
- <INTEGER_LITERAL> ...
- <FLOATING_POINT_LITERAL> ...
- <STRING_LITERAL> ...
- "true" ...
- "false" ...
- "null" ...
- "(" ...
- "-" ...
- "not" ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
-Expression: ${ge}
-ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "ge" at line 1, column 3.
-Was expecting one of:
- <INTEGER_LITERAL> ...
- <FLOATING_POINT_LITERAL> ...
- <STRING_LITERAL> ...
- "true" ...
- "false" ...
- "null" ...
- "(" ...
- "-" ...
- "not" ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
-Expression: ${instanceof}
-ExpectedType: class java.lang.Object
-Evaluates to: null
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${lt}": Encountered "lt", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
-Expression: ${page}
+Expression: ${gt}
ExpectedType: class java.lang.Object
-Evaluates to: org.apache.taglibs.standard.lang.jstl.ImplicitObjects$1@599a4d
-With type: org.apache.taglibs.standard.lang.jstl.ImplicitObjects$1
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${gt}": Encountered "gt", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
-Expression: ${request}
+Expression: ${le}
ExpectedType: class java.lang.Object
-Evaluates to: org.apache.taglibs.standard.lang.jstl.ImplicitObjects$2@49ba38
-With type: org.apache.taglibs.standard.lang.jstl.ImplicitObjects$2
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${le}": Encountered "le", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
-Expression: ${session}
+Expression: ${ge}
ExpectedType: class java.lang.Object
-Evaluates to: org.apache.taglibs.standard.lang.jstl.ImplicitObjects$3@6859c0
-With type: org.apache.taglibs.standard.lang.jstl.ImplicitObjects$3
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${ge}": Encountered "ge", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
-Expression: ${app}
+Expression: ${instanceof}
ExpectedType: class java.lang.Object
Evaluates to: null
@@ -1666,165 +1194,89 @@
Expression: ${bean1a.and}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "and" at line 1, column 10.
-Was expecting one of:
- <STRING_LITERAL> ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.and}": Encountered "and", expected one of [<IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.or}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "or" at line 1, column 10.
-Was expecting one of:
- <STRING_LITERAL> ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.or}": Encountered "or", expected one of [<IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.not}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "not" at line 1, column 10.
-Was expecting one of:
- <STRING_LITERAL> ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.not}": Encountered "not", expected one of [<IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.eq}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "eq" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.eq}": Encountered "eq", expected one of [<IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.ne}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "ne" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.ne}": Encountered "ne", expected one of [<IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.lt}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "lt" at line 1, column 10.
-Was expecting one of:
- <STRING_LITERAL> ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.lt}": Encountered "lt", expected one of [<IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.gt}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "gt" at line 1, column 10.
-Was expecting one of:
- <STRING_LITERAL> ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.gt}": Encountered "gt", expected one of [<IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.le}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "le" at line 1, column 10.
-Was expecting one of:
- <STRING_LITERAL> ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.le}": Encountered "le", expected one of [<IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.ge}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "ge" at line 1, column 10.
-Was expecting one of:
- <STRING_LITERAL> ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.ge}": Encountered "ge", expected one of [<IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.instanceof}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "instanceof" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.instanceof}": Unable to find a value for "instanceof" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.page}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "page" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.page}": Unable to find a value for "page" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.request}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "request" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.request}": Unable to find a value for "request" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.session}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "session" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
-Expression: ${bean1a.app}
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.session}": Unable to find a value for "session" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
+Expression: ${bean1a.application}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "app" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.application}": Unable to find a value for "application" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.true}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "true" at line 1, column 10.
-Was expecting one of:
- <STRING_LITERAL> ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.true}": Encountered "true", expected one of [<IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.false}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "false" at line 1, column 10.
-Was expecting one of:
- <STRING_LITERAL> ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.false}": Encountered "false", expected one of [<IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
Expression: ${bean1a.null}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "null" at line 1, column 10.
-Was expecting one of:
- <STRING_LITERAL> ...
- "pageContext" ...
- "page" ...
- "request" ...
- "session" ...
- "application" ...
- "param" ...
- "params" ...
- <IDENTIFIER> ...
-
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${bean1a.null}": Encountered "null", expected one of [<IDENTIFIER>]
+With type: javax.servlet.jsp.JspException
+
#######################################################
# test arithmetic
@@ -2026,22 +1478,34 @@
# Test as indexed property accessor
Expression: ${ bean1a.indexed1[-1]}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "indexed1" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${ bean1a.indexed1[-1]}": Unable to find a value for "indexed1" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
Expression: ${ bean1a.indexed1[0]}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "indexed1" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${ bean1a.indexed1[0]}": Unable to find a value for "indexed1" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
Expression: ${ bean1a.indexed1[1]}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "indexed1" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${ bean1a.indexed1[1]}": Unable to find a value for "indexed1" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
Expression: ${ bean1a.indexed1[2]}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "indexed1" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${ bean1a.indexed1[2]}": Unable to find a value for "indexed1" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
Expression: ${ bean1a.indexed1[3]}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "indexed1" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${ bean1a.indexed1[3]}": Unable to find a value for "indexed1" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
Expression: ${ bean1a.indexed1[4]}
ExpectedType: class java.lang.Object
-Causes an error: Unable to find a value for "indexed1" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${ bean1a.indexed1[4]}": Unable to find a value for "indexed1" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1" using operator "."
+With type: javax.servlet.jsp.JspException
+
# Test as map accessor
Expression: ${ bean1a.map1.key1 }
@@ -2075,13 +1539,19 @@
Expression: ${ "a" + "bcd" }
ExpectedType: class java.lang.Object
-Causes an error: Attempt to apply operator "+" to arguments of type "java.lang.String" and "java.lang.String"
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${ "a" + "bcd" }": Attempt to apply operator "+" to arguments of type "java.lang.String" and "java.lang.String"
+With type: javax.servlet.jsp.JspException
+
Expression: ${ "a" + (4*3) }
ExpectedType: class java.lang.Object
-Causes an error: An exception occured trying to convert String "a" to type "java.lang.Long"
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${ "a" + (4*3) }": An exception occured trying to convert String "a" to type "java.lang.Long"
+With type: javax.servlet.jsp.JspException
+
Expression: ${ bean1a.map1 ["key" + (5-4)] }
ExpectedType: class java.lang.Object
-Causes an error: An exception occured trying to convert String "key" to type "java.lang.Long"
+Evaluates to: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${ bean1a.map1 ["key" + (5-4)] }": An exception occured trying to convert String "key" to type "java.lang.Long"
+With type: javax.servlet.jsp.JspException
+
#######################################################
# test String comparisons
@@ -2112,112 +1582,24 @@
Expression: ${ 4 eq 3}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "eq" at line 1, column 6.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${ 4 neq 3}
-ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "neq" at line 1, column 6.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
+Evaluates to: false
+With type: java.lang.Boolean
+
+Expression: ${ 4 ne 3}
+ExpectedType: class java.lang.Object
+Evaluates to: true
+With type: java.lang.Boolean
+
Expression: ${ 4 eq 4}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "eq" at line 1, column 6.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${ 4 neq 4}
-ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "neq" at line 1, column 6.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
+Evaluates to: true
+With type: java.lang.Boolean
+
+Expression: ${ 4 ne 4}
+ExpectedType: class java.lang.Object
+Evaluates to: false
+With type: java.lang.Boolean
+
Expression: ${ 4 lt 3}
ExpectedType: class java.lang.Object
Evaluates to: false
@@ -2228,114 +1610,26 @@
Evaluates to: true
With type: java.lang.Boolean
-Expression: ${ 4 lte 3}
+Expression: ${ 4 le 3}
+ExpectedType: class java.lang.Object
+Evaluates to: false
+With type: java.lang.Boolean
+
+Expression: ${ 4 ge 3}
+ExpectedType: class java.lang.Object
+Evaluates to: true
+With type: java.lang.Boolean
+
+Expression: ${ 4 le 4}
+ExpectedType: class java.lang.Object
+Evaluates to: true
+With type: java.lang.Boolean
+
+Expression: ${ 4 ge 4}
ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "lte" at line 1, column 6.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${ 4 gte 3}
-ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "gte" at line 1, column 6.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${ 4 lte 4}
-ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "lte" at line 1, column 6.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
-Expression: ${ 4 gte 4}
-ExpectedType: class java.lang.Object
-Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.CustomParseException: Encountered "gte" at line 1, column 6.
-Was expecting one of:
- "}" ...
- "." ...
- ">" ...
- "gt" ...
- "<" ...
- "lt" ...
- "==" ...
- "<=" ...
- "le" ...
- ">=" ...
- "ge" ...
- "!=" ...
- "[" ...
- "+" ...
- "-" ...
- "*" ...
- "/" ...
- "div" ...
- "%" ...
- "mod" ...
- "and" ...
- "or" ...
-
+Evaluates to: true
+With type: java.lang.Boolean
+
#######################################################
# test expressions on the left side of a value suffix
1.8 +7 -7 jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/parserTestsOutput.txt
Index: parserTestsOutput.txt
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/parserTestsOutput.txt,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- parserTestsOutput.txt 12 Apr 2002 11:28:42 -0000 1.7
+++ parserTestsOutput.txt 14 Apr 2002 14:32:37 -0000 1.8
@@ -4,7 +4,7 @@
Attribute value: ${ 3}
Parses to: ${3}
Attribute value: a${
-Causes an error: Unable to parse custom action attribute "test" with value "a${": encountered "<EOF>", expected one of "<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", "pageContext", "page", "request", "session", "application", "param", "params", <IDENTIFIER>"
+Causes an error: An error occurred while parsing custom action attribute "test" with value "a${": Encountered "<EOF>", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
Attribute value: a${ 5 }
Parses to: a${5}
Attribute value: ${ 3 }b
@@ -76,9 +76,9 @@
Attribute value: ${" with escaping \"\\\""}
Parses to: ${" with escaping \"\\\""}
Attribute value: ${" bad \ escaping"}
-Causes an error: Unable to parse custom action attribute "test" with value "${" bad \ escaping"}": encountered "" bad \ ", expected one of "<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", "pageContext", "page", "request", "session", "application", "param", "params", <IDENTIFIER>"
+Causes an error: An error occurred while parsing custom action attribute "test" with value "${" bad \ escaping"}": Encountered "" bad \ ", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
Attribute value: ${" bad \' escaping"}
-Causes an error: Unable to parse custom action attribute "test" with value "${" bad \' escaping"}": encountered "" bad \'", expected one of "<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", "pageContext", "page", "request", "session", "application", "param", "params", <IDENTIFIER>"
+Causes an error: An error occurred while parsing custom action attribute "test" with value "${" bad \' escaping"}": Encountered "" bad \'", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
# string literals with '
Attribute value: ${'abc'}
@@ -98,9 +98,9 @@
Attribute value: ${' with escaping \'\\\''}
Parses to: ${" with escaping '\\'"}
Attribute value: ${' bad \ escaping'}
-Causes an error: Unable to parse custom action attribute "test" with value "${' bad \ escaping'}": encountered "' bad \ ", expected one of "<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", "pageContext", "page", "request", "session", "application", "param", "params", <IDENTIFIER>"
+Causes an error: An error occurred while parsing custom action attribute "test" with value "${' bad \ escaping'}": Encountered "' bad \ ", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
Attribute value: ${' bad \" escaping'}
-Causes an error: Unable to parse custom action attribute "test" with value "${' bad \" escaping'}": encountered "' bad \"", expected one of "<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", "pageContext", "page", "request", "session", "application", "param", "params", <IDENTIFIER>"
+Causes an error: An error occurred while parsing custom action attribute "test" with value "${' bad \" escaping'}": Encountered "' bad \"", expected one of [<INTEGER_LITERAL>, <FLOATING_POINT_LITERAL>, <STRING_LITERAL>, "true", "false", "null", "(", "-", "not", "!", <IDENTIFIER>]
# identifiers
Attribute value: ${abc}
@@ -116,7 +116,7 @@
Attribute value: ${a .b .c}
Parses to: ${a.b.c}
Attribute value: ${ abc . 'def.ghi' . ghi . "jkl \"" }
-Causes an error: Unable to parse custom action attribute "test" with value "${ abc . 'def.ghi' . ghi . "jkl \"" }": encountered "'def.ghi'", expected one of ""pageContext", "page", "request", "session", "application", "param", "params", <IDENTIFIER>"
+Causes an error: An error occurred while parsing custom action attribute "test" with value "${ abc . 'def.ghi' . ghi . "jkl \"" }": Encountered "'def.ghi'", expected one of [<IDENTIFIER>]
# array accessors
Attribute value: ${ a[14] }
@@ -150,7 +150,7 @@
# array accessors of non-integer types
Attribute value: ${ a ["hello"]."12" [17.5] }
-Causes an error: Unable to parse custom action attribute "test" with value "${ a ["hello"]."12" [17.5] }": encountered ""12"", expected one of ""pageContext", "page", "request", "session", "application", "param", "params", <IDENTIFIER>"
+Causes an error: An error occurred while parsing custom action attribute "test" with value "${ a ["hello"]."12" [17.5] }": Encountered ""12"", expected one of [<IDENTIFIER>]
# making sure unicode escapes are not recognized
Attribute value: \u0040
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
sknystautas@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
mpangaro@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
sknystautas@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
mpangaro@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
sknystautas@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
sknystautas@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
mpangaro@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
sknystautas@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
sknystautas@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
mpangaro@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
sknystautas@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
mpangaro@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.
Re: cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test EvaluationTest.java ParserTest.java evaluationTests.txt evaluationTestsOutput.txt parserTestsOutput.txt
Posted by po...@lokitech.com.
Hi. This is the James mail server at beethoven.lokitech.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
mpangaro@liszt.lokitech.com
Could not connect to SMTP host: liszt.lokitech.com, port: 25
The original message is attached.