struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/template GetTag.java InsertTag.java PutTag.java
Date Thu, 12 Oct 2000 23:05:23 GMT
craigmcc    00/10/12 16:05:23

  Modified:    src/share/org/apache/struts/taglib/template GetTag.java
                        InsertTag.java PutTag.java
  Log:
  Store the exception we are throwing as a request attribute.
  
  Revision  Changes    Path
  1.3       +9 -5      jakarta-struts/src/share/org/apache/struts/taglib/template/GetTag.java
  
  Index: GetTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/template/GetTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetTag.java	2000/10/08 01:15:14	1.2
  +++ GetTag.java	2000/10/12 23:05:21	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/template/GetTag.java,v
1.2 2000/10/08 01:15:14 dgeary Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/10/08 01:15:14 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/template/GetTag.java,v
1.3 2000/10/12 23:05:21 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/10/12 23:05:21 $
    *
    * ====================================================================
    *
  @@ -65,7 +65,7 @@
   import javax.servlet.jsp.JspException;
   import javax.servlet.jsp.PageContext;
   import javax.servlet.jsp.tagext.TagSupport;
  -
  +import org.apache.struts.action.Action;
   import org.apache.struts.taglib.template.util.*;
   
   /**
  @@ -74,7 +74,7 @@
    * it, depending upon the value of the content's direct attribute.
    *
    * @author David Geary
  - * @version $Revision: 1.2 $ $Date: 2000/10/08 01:15:14 $
  + * @version $Revision: 1.3 $ $Date: 2000/10/12 23:05:21 $
    */
   public class GetTag extends TagSupport {
   
  @@ -114,6 +114,8 @@
                  pageContext.getOut().print(content.toString());
               }
               catch(java.io.IOException ex) {
  +               pageContext.setAttribute(Action.EXCEPTION_KEY, ex,
  +                                        PageContext.REQUEST_SCOPE);
                  throw new JspException(ex.getMessage());
               }
            }
  @@ -123,6 +125,8 @@
                  pageContext.include(content.toString());
               }
               catch(Exception ex) { 
  +               pageContext.setAttribute(Action.EXCEPTION_KEY, ex,
  +                                        PageContext.REQUEST_SCOPE);
                  throw new JspException(ex.getMessage());
               }
            }
  
  
  
  1.2       +7 -5      jakarta-struts/src/share/org/apache/struts/taglib/template/InsertTag.java
  
  Index: InsertTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/template/InsertTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InsertTag.java	2000/10/08 01:15:14	1.1
  +++ InsertTag.java	2000/10/12 23:05:21	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/template/InsertTag.java,v
1.1 2000/10/08 01:15:14 dgeary Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/10/08 01:15:14 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/template/InsertTag.java,v
1.2 2000/10/12 23:05:21 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/10/12 23:05:21 $
    *
    * ====================================================================
    *
  @@ -65,7 +65,7 @@
   import javax.servlet.jsp.JspException;
   import javax.servlet.jsp.PageContext;
   import javax.servlet.jsp.tagext.TagSupport;
  -
  +import org.apache.struts.action.Action;
   import org.apache.struts.taglib.template.util.*;
   
   /**
  @@ -74,7 +74,7 @@
    * tags, which are accessed by <template:get> in the template.
    *
    * @author David Geary
  - * @version $Revision: 1.1 $ $Date: 2000/10/08 01:15:14 $
  + * @version $Revision: 1.2 $ $Date: 2000/10/12 23:05:21 $
    */
   public class InsertTag extends TagSupport {
   
  @@ -128,6 +128,8 @@
            pageContext.include(template);
         }
         catch(Exception ex) { // IOException or ServletException
  +         pageContext.setAttribute(Action.EXCEPTION_KEY, ex,
  +                                  PageContext.REQUEST_SCOPE);
            throw new JspException(ex.getMessage());
         }
         ContentMapStack.pop(pageContext);
  
  
  
  1.3       +8 -5      jakarta-struts/src/share/org/apache/struts/taglib/template/PutTag.java
  
  Index: PutTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/template/PutTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PutTag.java	2000/10/08 21:10:31	1.2
  +++ PutTag.java	2000/10/12 23:05:21	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/template/PutTag.java,v
1.2 2000/10/08 21:10:31 dgeary Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/10/08 21:10:31 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/template/PutTag.java,v
1.3 2000/10/12 23:05:21 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/10/12 23:05:21 $
    *
    * ====================================================================
    *
  @@ -63,15 +63,16 @@
   import java.util.Hashtable;
   import java.util.Stack;
   import javax.servlet.jsp.JspException;
  +import javax.servlet.jsp.PageContext;
   import javax.servlet.jsp.tagext.TagSupport;
  -
  +import org.apache.struts.action.Action;
   import org.apache.struts.taglib.template.util.Content;
   
   /**
    * Tag handler for <template:put>, which puts content into request scope.
    *
    * @author David Geary
  - * @version $Revision: 1.2 $ $Date: 2000/10/08 21:10:31 $
  + * @version $Revision: 1.3 $ $Date: 2000/10/12 23:05:21 $
    */
   public class PutTag extends TagSupport {
   
  @@ -176,6 +177,8 @@
            klass = Class.forName(className);
         }
         catch(ClassNotFoundException ex) {
  +         pageContext.setAttribute(Action.EXCEPTION_KEY, ex,
  +                                  PageContext.REQUEST_SCOPE);
            throw new JspException(ex.getMessage());
         }
         return (TagSupport)findAncestorWithClass(this, klass);
  
  
  

Mime
View raw message