cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: Logging of multiple parameter values in Cocoon.java
Date Wed, 29 Aug 2001 17:57:54 GMT
Mariano,
Checked into both branches. Please cross-check.

Thanks,
dims

--- Mariano Kamp <mkamp@codamax.com> wrote:
> Hi there,
> 
>   we have loads of forms with more than one value per parameter. I attached a 
> few lines which do log multiple parameter values instead of just the first 
> element. 
> 
> Cheers,
> Mariano> Index: Cocoon.java
> ===================================================================
> RCS file: /home/cvspublic/xml-cocoon2/src/org/apache/cocoon/Cocoon.java,v
> retrieving revision 1.21
> diff -u -r1.21 Cocoon.java
> --- Cocoon.java	2001/08/25 19:40:31	1.21
> +++ Cocoon.java	2001/08/29 16:25:29
> @@ -386,7 +386,15 @@
>                  String p = (String) e.nextElement();
>  
>                   msg.append("PARAM: '").append(p).append("' ")
> -                    .append("VALUE:
> '").append(request.getParameter(p)).append("'").append(lineSeparator);
> +                    .append("VALUES: '");
> +		 String[] params = request.getParameterValues(p);
> +		 for (int i = 0; i < params.length; i++) {
> +		     msg.append("["+params[i]+"]");
> +		     if (i != params.length-1) 
> +			 msg.append(", ");
> +		 }
> +		     
> +		 msg.append("'").append(lineSeparator);
>              }
>  
>              msg.append(lineSeparator).append("SESSION
> ATTRIBUTES:").append(lineSeparator).append(lineSeparator);
> > ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message