>>>>> "Chris" == Chris Pratt <[EMAIL PROTECTED]> writes:
Chris> Ahh, I think you need to look a little closer at those definitions, I Chris> believe what you'll find is actually this: Chris> Enumeration ServletRequest.getAttributeNames() Chris> Enumeration ServletRequest.getParameterNames() Chris> Enumeration ServletConfig.getInitParameterNames() Chris> Enumeration HttpServletRequest.getHeaderNames() Chris> String[] ServletRequest.getParameterValues(String key) Chris> Notice that all the xxxNames() methods return an enumeration over a set of Chris> Keys (or names). The one xxxValues() method returns the (possibly numerous) Chris> values for a single key. So you might see something like this: Chris> Enumeration enum = request.getParameterNames(); Chris> while(enum.hasMoreElements()) { Chris> String key = (String)enum.nextElement(); Chris> String[] vals = request.getParameterValues(key); Chris> for(int i = 0;i < vals.length;i++) { Chris> out.println(key + '[' + i + "] = " + vals[i]); Chris> } Chris> } Chris> So the spec uses Enumerations for Keys and Strings or Arrays of Strings for Chris> values. Yes, I can see that. Enumerations for keys and Arrays for values. Now tell me why. I'm not arguing whether one is better, I'm just wondering why values are done differently from keys. Does it have something to do with the fact that the parameter values from a single key have a stronger relationship than between attribute, parameter, initParameter, and header names? -- =================================================================== David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] ; SCJP ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html