craigmcc 02/03/15 17:53:50
Modified: src/share/org/apache/struts/taglib/logic Tag:
STRUTS_1_0_BRANCH PresentTag.java
Log:
Port fix for 7097 (<logic:present> and <logic:notPresent> bogus
exception) to the 1.0 branch.
PR: Bugzilla #7097
Submitted by: Gidado-Yisa Immanuel <avm3 at cdc.gov>
Revision Changes Path
No revision
No revision
1.7.2.2 +10 -6
jakarta-struts/src/share/org/apache/struts/taglib/logic/PresentTag.java
Index: PresentTag.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/PresentTag.java,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -u -r1.7.2.1 -r1.7.2.2
--- PresentTag.java 11 Jun 2001 17:34:40 -0000 1.7.2.1
+++ PresentTag.java 16 Mar 2002 01:53:50 -0000 1.7.2.2
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/PresentTag.java,v
1.7.2.1 2001/06/11 17:34:40 craigmcc Exp $
- * $Revision: 1.7.2.1 $
- * $Date: 2001/06/11 17:34:40 $
+ * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/PresentTag.java,v
1.7.2.2 2002/03/16 01:53:50 craigmcc Exp $
+ * $Revision: 1.7.2.2 $
+ * $Date: 2002/03/16 01:53:50 $
*
* ====================================================================
*
@@ -77,7 +77,7 @@
* is present for this request.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.7.2.1 $ $Date: 2001/06/11 17:34:40 $
+ * @version $Revision: 1.7.2.2 $ $Date: 2002/03/16 01:53:50 $
*/
public class PresentTag extends ConditionalTagBase {
@@ -135,8 +135,12 @@
} else if (name != null) {
Object value = null;
try {
- value =
- RequestUtils.lookup(pageContext, name, property, scope);
+ if (property != null) {
+ value = RequestUtils.lookup(pageContext, name,
+ property, scope);
+ } else {
+ value = RequestUtils.lookup(pageContext, name, scope);
+ }
} catch (JspException e) {
value = null;
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>