You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@locus.apache.org on 2000/10/30 03:30:25 UTC

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/bean CookieTag.java DefineTag.java HeaderTag.java IncludeTag.java PageTag.java ParameterTag.java ResourceTag.java StrutsTag.java WriteTag.java

craigmcc    00/10/29 18:30:24

  Modified:    src/share/org/apache/struts/taglib/bean CookieTag.java
                        DefineTag.java HeaderTag.java IncludeTag.java
                        PageTag.java ParameterTag.java ResourceTag.java
                        StrutsTag.java WriteTag.java
  Log:
  Modify tags in the struts-bean library to *always* store a copy of any
  JspException that is thrown in the request attributes, so that it can
  be used in error reporting pages.  Previously, several cases of generated
  JspExceptions were not being stored.
  
  Revision  Changes    Path
  1.3       +11 -6     jakarta-struts/src/share/org/apache/struts/taglib/bean/CookieTag.java
  
  Index: CookieTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/CookieTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CookieTag.java	2000/09/05 21:25:45	1.2
  +++ CookieTag.java	2000/10/30 02:30:22	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/CookieTag.java,v 1.2 2000/09/05 21:25:45 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/09/05 21:25:45 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/CookieTag.java,v 1.3 2000/10/30 02:30:22 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/10/30 02:30:22 $
    *
    * ====================================================================
    *
  @@ -71,6 +71,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.util.MessageResources;
   import org.apache.struts.util.PropertyUtils;
   
  @@ -81,7 +82,7 @@
    * cookie received with this request.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2000/09/05 21:25:45 $
  + * @version $Revision: 1.3 $ $Date: 2000/10/30 02:30:22 $
    */
   
   public final class CookieTag extends TagSupport {
  @@ -162,9 +163,13 @@
               if (name.equals(cookies[i].getName()))
                   values.addElement(cookies[i]);
           }
  -        if (values.size() < 1)
  -            throw new JspException
  +        if (values.size() < 1) {
  +            JspException e = new JspException
                   (messages.getMessage("getter.cookie", name));
  +            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  +                                     PageContext.REQUEST_SCOPE);
  +            throw e;
  +        }
   
           // Expose an appropriate variable containing these results
           if (multiple == null) {
  
  
  
  1.4       +10 -6     jakarta-struts/src/share/org/apache/struts/taglib/bean/DefineTag.java
  
  Index: DefineTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/DefineTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefineTag.java	2000/10/12 23:17:15	1.3
  +++ DefineTag.java	2000/10/30 02:30:22	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/DefineTag.java,v 1.3 2000/10/12 23:17:15 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/10/12 23:17:15 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/DefineTag.java,v 1.4 2000/10/30 02:30:22 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/10/30 02:30:22 $
    *
    * ====================================================================
    *
  @@ -79,7 +79,7 @@
    * bean property.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2000/10/12 23:17:15 $
  + * @version $Revision: 1.4 $ $Date: 2000/10/30 02:30:22 $
    */
   
   public final class DefineTag extends TagSupport {
  @@ -186,9 +186,13 @@
   	    bean = BeanUtils.lookup(pageContext, name, scope);
   
               // Locate the specified property
  -            if (bean == null)
  -                throw new JspException
  +            if (bean == null) {
  +                JspException e = new JspException
                       (messages.getMessage("getter.bean", name));
  +                pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  +                                         PageContext.REQUEST_SCOPE);
  +                throw e;
  +            }
               if (property == null)
                   value = bean;
               else
  
  
  
  1.2       +16 -7     jakarta-struts/src/share/org/apache/struts/taglib/bean/HeaderTag.java
  
  Index: HeaderTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/HeaderTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HeaderTag.java	2000/08/30 02:15:05	1.1
  +++ HeaderTag.java	2000/10/30 02:30:22	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/HeaderTag.java,v 1.1 2000/08/30 02:15:05 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/08/30 02:15:05 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/HeaderTag.java,v 1.2 2000/10/30 02:30:22 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/10/30 02:30:22 $
    *
    * ====================================================================
    *
  @@ -71,6 +71,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.util.MessageResources;
   import org.apache.struts.util.PropertyUtils;
   
  @@ -81,7 +82,7 @@
    * header received with this request.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/08/30 02:15:05 $
  + * @version $Revision: 1.2 $ $Date: 2000/10/30 02:30:22 $
    */
   
   public final class HeaderTag extends TagSupport {
  @@ -155,9 +156,13 @@
           if (multiple == null) {
   	    String value =
   	      ((HttpServletRequest) pageContext.getRequest()).getHeader(name);
  -	    if (value == null)
  -	        throw new JspException
  +	    if (value == null) {
  +	        JspException e = new JspException
   		  (messages.getMessage("getter.header", name));
  +                pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  +                                         PageContext.REQUEST_SCOPE);
  +                throw e;
  +            }
   	    pageContext.setAttribute(id, value);
   	    return (SKIP_BODY);
   	}
  @@ -169,9 +174,13 @@
   	while (items.hasMoreElements())
   	    values.addElement(items.nextElement());
   	String headers[] = new String[values.size()];
  -	if (headers.length == 0)
  -	    throw new JspException
  +	if (headers.length == 0) {
  +	    JspException e = new JspException
   	      (messages.getMessage("getter.header", name));
  +            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  +                                     PageContext.REQUEST_SCOPE);
  +            throw e;
  +        }
   	pageContext.setAttribute(id, (String[]) values.toArray(headers));
           return (SKIP_BODY);
   
  
  
  
  1.4       +15 -11    jakarta-struts/src/share/org/apache/struts/taglib/bean/IncludeTag.java
  
  Index: IncludeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/IncludeTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IncludeTag.java	2000/10/12 23:17:16	1.3
  +++ IncludeTag.java	2000/10/30 02:30:22	1.4
  @@ -1,10 +1,10 @@
   /*
  - * $Id: IncludeTag.java,v 1.3 2000/10/12 23:17:16 craigmcc Exp $
  + * $Id: IncludeTag.java,v 1.4 2000/10/30 02:30:22 craigmcc Exp $
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -12,7 +12,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -20,15 +20,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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 
  + *    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"
  @@ -56,7 +56,7 @@
    *
    * [Additional notices, if required by prior licensing conditions]
    *
  - */ 
  + */
   
   package org.apache.struts.taglib.bean;
   
  @@ -81,7 +81,7 @@
    * wrapped response passed to RequestDispatcher.include().
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2000/10/12 23:17:16 $
  + * @version $Revision: 1.4 $ $Date: 2000/10/30 02:30:22 $
    */
   
   public class IncludeTag extends TagSupport {
  @@ -146,9 +146,13 @@
   
   	// Validate the format of the "name" attribute
   	// FIXME - deal with relative URIs like <jsp:include> does
  -	if (!name.startsWith("/"))
  -	    throw new JspException
  -                (messages.getMessage("include.format", name));
  +	if (!name.startsWith("/")) {
  +            JspException e = new JspException
  +              (messages.getMessage("include.format", name));
  +            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  +                                     PageContext.REQUEST_SCOPE);
  +            throw e;
  +        }
   
   	// Set up a URLConnection to read the requested page
   	HttpServletRequest request =
  
  
  
  1.2       +11 -6     jakarta-struts/src/share/org/apache/struts/taglib/bean/PageTag.java
  
  Index: PageTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/PageTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PageTag.java	2000/10/08 00:40:49	1.1
  +++ PageTag.java	2000/10/30 02:30:22	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/PageTag.java,v 1.1 2000/10/08 00:40:49 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/10/08 00:40:49 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/PageTag.java,v 1.2 2000/10/30 02:30:22 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/10/30 02:30:22 $
    *
    * ====================================================================
    *
  @@ -67,6 +67,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.util.BeanUtils;
   import org.apache.struts.util.MessageResources;
   import org.apache.struts.util.PropertyUtils;
  @@ -77,7 +78,7 @@
    * item as a scripting variable and a page scope bean.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/10/08 00:40:49 $
  + * @version $Revision: 1.2 $ $Date: 2000/10/30 02:30:22 $
    */
   
   public final class PageTag extends TagSupport {
  @@ -146,9 +147,13 @@
               object = pageContext.getResponse();
           else if ("session".equalsIgnoreCase(property))
               object = pageContext.getSession();
  -        else
  -            throw new JspException
  +        else {
  +            JspException e = new JspException
                   (messages.getMessage("page.selector", property));
  +            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  +                                     PageContext.REQUEST_SCOPE);
  +            throw e;
  +        }
   
           // Expose this value as a scripting variable
           pageContext.setAttribute(id, object);
  
  
  
  1.2       +16 -7     jakarta-struts/src/share/org/apache/struts/taglib/bean/ParameterTag.java
  
  Index: ParameterTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/ParameterTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParameterTag.java	2000/08/30 02:15:06	1.1
  +++ ParameterTag.java	2000/10/30 02:30:23	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/ParameterTag.java,v 1.1 2000/08/30 02:15:06 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/08/30 02:15:06 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/ParameterTag.java,v 1.2 2000/10/30 02:30:23 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/10/30 02:30:23 $
    *
    * ====================================================================
    *
  @@ -68,6 +68,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.util.MessageResources;
   import org.apache.struts.util.PropertyUtils;
   
  @@ -78,7 +79,7 @@
    * parameter received with this request.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/08/30 02:15:06 $
  + * @version $Revision: 1.2 $ $Date: 2000/10/30 02:30:23 $
    */
   
   public final class ParameterTag extends TagSupport {
  @@ -153,9 +154,13 @@
           if (multiple == null) {
   	    String value =
   	      pageContext.getRequest().getParameter(name);
  -	    if (value == null)
  -	        throw new JspException
  +	    if (value == null) {
  +	        JspException e = new JspException
   		  (messages.getMessage("getter.parameter", name));
  +                pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  +                                         PageContext.REQUEST_SCOPE);
  +                throw e;
  +            }
   	    pageContext.setAttribute(id, value);
   	    return (SKIP_BODY);
   	}
  @@ -163,9 +168,13 @@
   	// Deal with multiple parameter values
   	String values[] =
   	  pageContext.getRequest().getParameterValues(name);
  -	if ((values == null) || (values.length == 0))
  -	    throw new JspException
  +	if ((values == null) || (values.length == 0)) {
  +	    JspException e = new JspException
   	      (messages.getMessage("getter.parameter", name));
  +            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  +                                     PageContext.REQUEST_SCOPE);
  +            throw e;
  +        }
   	pageContext.setAttribute(id, values);
           return (SKIP_BODY);
   
  
  
  
  1.4       +10 -6     jakarta-struts/src/share/org/apache/struts/taglib/bean/ResourceTag.java
  
  Index: ResourceTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/ResourceTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ResourceTag.java	2000/10/12 23:17:16	1.3
  +++ ResourceTag.java	2000/10/30 02:30:23	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/ResourceTag.java,v 1.3 2000/10/12 23:17:16 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/10/12 23:17:16 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/ResourceTag.java,v 1.4 2000/10/30 02:30:23 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/10/30 02:30:23 $
    *
    * ====================================================================
    *
  @@ -81,7 +81,7 @@
    * web application resource.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2000/10/12 23:17:16 $
  + * @version $Revision: 1.4 $ $Date: 2000/10/30 02:30:23 $
    */
   
   public final class ResourceTag extends TagSupport {
  @@ -160,9 +160,13 @@
           // Acquire an input stream to the specified resource
           InputStream stream =
   	  pageContext.getServletContext().getResourceAsStream(name);
  -	if (stream == null)
  -	    throw new JspException
  +	if (stream == null) {
  +	    JspException e = new JspException
   	      (messages.getMessage("getter.resource", name));
  +            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  +                                     PageContext.REQUEST_SCOPE);
  +            throw e;
  +        }
   
   	// If we are returning an InputStream, do so and return
   	if (input != null) {
  
  
  
  1.2       +16 -8     jakarta-struts/src/share/org/apache/struts/taglib/bean/StrutsTag.java
  
  Index: StrutsTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/StrutsTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StrutsTag.java	2000/10/08 00:40:49	1.1
  +++ StrutsTag.java	2000/10/30 02:30:23	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/StrutsTag.java,v 1.1 2000/10/08 00:40:49 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/10/08 00:40:49 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/StrutsTag.java,v 1.2 2000/10/30 02:30:23 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/10/30 02:30:23 $
    *
    * ====================================================================
    *
  @@ -81,7 +81,7 @@
    * internal configuraton object.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/10/08 00:40:49 $
  + * @version $Revision: 1.2 $ $Date: 2000/10/30 02:30:23 $
    */
   
   public final class StrutsTag extends TagSupport {
  @@ -174,9 +174,13 @@
               n++;
           if (mapping != null)
               n++;
  -        if (n != 1)
  -            throw new JspException
  +        if (n != 1) {
  +            JspException e = new JspException
                   (messages.getMessage("struts.selector"));
  +            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  +                                     PageContext.REQUEST_SCOPE);
  +            throw e;
  +        }
   
           // Retrieve the requested object to be exposed
           Object object = null;
  @@ -200,9 +204,13 @@
               if (collection != null)
                   object = collection.findMapping(mapping);
           }
  -        if (object == null)
  -            throw new JspException
  +        if (object == null) {
  +            JspException e = new JspException
                   (messages.getMessage("struts.missing", selector));
  +            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  +                                     PageContext.REQUEST_SCOPE);
  +            throw e;
  +        }
   
           // Expose this value as a scripting variable
           pageContext.setAttribute(id, object);
  
  
  
  1.4       +17 -13    jakarta-struts/src/share/org/apache/struts/taglib/bean/WriteTag.java
  
  Index: WriteTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/WriteTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WriteTag.java	2000/10/12 23:17:16	1.3
  +++ WriteTag.java	2000/10/30 02:30:23	1.4
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/WriteTag.java,v 1.3 2000/10/12 23:17:16 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/10/12 23:17:16 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/WriteTag.java,v 1.4 2000/10/30 02:30:23 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/10/30 02:30:23 $
    *
    * ====================================================================
  - * 
  + *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -15,7 +15,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -23,15 +23,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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 
  + *    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"
  @@ -57,7 +57,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    *
  - */ 
  + */
   
   
   package org.apache.struts.taglib.bean;
  @@ -81,7 +81,7 @@
    * output stream, optionally filtering characters that are sensitive in HTML.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2000/10/12 23:17:16 $
  + * @version $Revision: 1.4 $ $Date: 2000/10/30 02:30:23 $
    */
   
   public final class WriteTag extends TagSupport {
  @@ -180,9 +180,13 @@
                   throw new JspException
                       (messages.getMessage("getter.scope", scope));
               }
  -            if (bean == null)
  -                throw new JspException
  +            if (bean == null) {
  +                JspException e = new JspException
                       (messages.getMessage("getter.bean", name));
  +                pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  +                                         PageContext.REQUEST_SCOPE);
  +                throw e;
  +            }
   
               // Locate the specified property
               if (property == null)