jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gl...@apache.org
Subject cvs commit: jakarta-taglibs/request/src/org/apache/taglibs/request HeaderValuesTag.java ParameterValuesTag.java
Date Thu, 04 Apr 2002 19:07:53 GMT
glenn       02/04/04 11:07:53

  Modified:    request/src/org/apache/taglibs/request HeaderValuesTag.java
                        ParameterValuesTag.java
  Log:
  Fix a bug caused by not reinitializing instance variables in doStart
  
  Revision  Changes    Path
  1.4       +8 -9      jakarta-taglibs/request/src/org/apache/taglibs/request/HeaderValuesTag.java
  
  Index: HeaderValuesTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/request/src/org/apache/taglibs/request/HeaderValuesTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HeaderValuesTag.java	13 Jul 2001 00:09:02 -0000	1.3
  +++ HeaderValuesTag.java	4 Apr 2002 19:07:52 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-taglibs/request/src/org/apache/taglibs/request/HeaderValuesTag.java,v
1.3 2001/07/13 00:09:02 glenn Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/07/13 00:09:02 $
  + * $Header: /home/cvs/jakarta-taglibs/request/src/org/apache/taglibs/request/HeaderValuesTag.java,v
1.4 2002/04/04 19:07:52 glenn Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/04/04 19:07:52 $
    *
    * ====================================================================
    *
  @@ -104,8 +104,6 @@
       private Enumeration values = null;
       // Current value
       private String value = null;
  -    // Name of HTTP header
  -    private String header = null;
   
       /**
        * Gets the header values for the current header.
  @@ -114,6 +112,10 @@
        */
       public final int doStartTag() throws JspException
       {
  +        // Initialize variables
  +        values = null;
  +        value = null;
  +
   	// Get the parent headers tag
   	HeadersTag ht;
   	try {
  @@ -123,11 +125,8 @@
   	    return SKIP_BODY;
   	}
   
  -	// Get the name of the header
  -	header = ht.getName();
  -
   	// Get the headers
  -	values = ((HttpServletRequest)pageContext.getRequest()).getHeaders(header);
  +	values = ((HttpServletRequest)pageContext.getRequest()).getHeaders(ht.getName());
   	if( values == null || !values.hasMoreElements() )
   	    return SKIP_BODY;
   
  
  
  
  1.4       +9 -8      jakarta-taglibs/request/src/org/apache/taglibs/request/ParameterValuesTag.java
  
  Index: ParameterValuesTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/request/src/org/apache/taglibs/request/ParameterValuesTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ParameterValuesTag.java	13 Jul 2001 00:09:06 -0000	1.3
  +++ ParameterValuesTag.java	4 Apr 2002 19:07:53 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-taglibs/request/src/org/apache/taglibs/request/ParameterValuesTag.java,v
1.3 2001/07/13 00:09:06 glenn Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/07/13 00:09:06 $
  + * $Header: /home/cvs/jakarta-taglibs/request/src/org/apache/taglibs/request/ParameterValuesTag.java,v
1.4 2002/04/04 19:07:53 glenn Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/04/04 19:07:53 $
    *
    * ====================================================================
    *
  @@ -100,7 +100,6 @@
   {
       private String [] values = null;
       private String value = null;
  -    private String parameter = null;
       private int parameter_num = 0;
   
       /**
  @@ -110,6 +109,11 @@
        */
       public final int doStartTag() throws JspException
       {
  +        // Initialize variables
  +        values = null;
  +        value = null;
  +        parameter_num = 0;
  +
   	// Get the parent parameters tag
   	ParametersTag pt;
   	try {
  @@ -119,11 +123,8 @@
   	    return SKIP_BODY;
   	}
   
  -	// Get the name of the parameter
  -	parameter = pt.getName();
  -
   	// Get the parameters
  -	values = ((HttpServletRequest)pageContext.getRequest()).getParameterValues(parameter);
  +	values = ((HttpServletRequest)pageContext.getRequest()).getParameterValues(pt.getName());
   	if( values == null || values.length == 0 )
   	    return SKIP_BODY;
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message