webwork/src/main/webwork/util ValueStack.java,1.32,1.33

[email protected] Thu, 30 May 2002 15:57:15 -0700
Newsgroups gmane.comp.java.webwork.cvs
Message-ID <[email protected]>
Update of /cvsroot/webwork/webwork/src/main/webwork/util
In directory usw-pr-cvs1:/tmp/cvs-serv29374

Modified Files:
	ValueStack.java 
Log Message:
work around fix Resin 2.1.1

Index: ValueStack.java
===================================================================
RCS file: /cvsroot/webwork/webwork/src/main/webwork/util/ValueStack.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- ValueStack.java	26 May 2002 08:50:27 -0000	1.32
+++ ValueStack.java	30 May 2002 22:57:13 -0000	1.33
@@ -6,6 +6,8 @@
 */
 package webwork.util;
 
+import org.apache.log4j.Category;
+
 import javax.servlet.ServletRequest;
 import javax.servlet.jsp.PageContext;
 
@@ -93,7 +95,12 @@
    protected Object findInContext(String id)
    {
       if (context != null) {
-         return context.findAttribute(id); // Used in a JSP environment
+         try {
+            return context.findAttribute(id); // Used in a JSP environment
+         } catch (Exception e) {
+            //needed for apparent bug in Resin 2.1.1 :(
+            return request.getAttribute(id);
+         }
       } else {
          return request.getAttribute(id); // Rarely, if ever, used. Ignore
       }



_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm