From: <dr...@us...> - 2002-11-10 20:51:16
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/servlet In directory usw-pr-cvs1:/tmp/cvs-serv2144/src/org/webmacro/servlet Modified Files: Form.java Log Message: fixng bug #66: implement .toString() method for Context and Form Index: Form.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/servlet/Form.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Form.java 15 Jul 2002 22:01:20 -0000 1.7 --- Form.java 10 Nov 2002 20:51:13 -0000 1.8 *************** *** 128,131 **** } ! } --- 128,147 ---- } ! /** ! * Return a String listing all the HTTP request parameter names and their values. ! */ ! final public String toString() { ! StringBuffer sb = new StringBuffer (); ! String eol = java.lang.System.getProperty ("line.separator"); ! for (Enumeration enum = _request.getParameterNames(); enum.hasMoreElements();) { ! String key = (String) enum.nextElement(); ! String[] value = _request.getParameterValues(key); + for (int x=0; value != null && x<value.length; x++) { + sb.append (key).append("=").append(value[x]).append (eol); + } + } + return sb.toString(); + } + + } \ No newline at end of file |