> From: August Detlefsen <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Wed, 6 Feb 2002 12:25:25 -0800 (PST) > To: Tomcat Users List <[EMAIL PROTECTED]> > Subject: Re: getParameterMap() question > > All request parameters are Strings: > > public java.lang.String getParameter(java.lang.String name) > > Try casting entry.getValue() to (String): > > (String)(entry.getValue())
Actually they are not all Strings and casting them as such will give you the results I was experiencing. In the case of getParameterMap() the Map.Entry VALUE Object is a String[]. This makes sense because even though the Key value is a Set, there may be more than one value per parameter Key (i.e. Checkboxes) so to make things work the Value is returned as a String[] in the guise of an Object(even if only a single value is returned). Where there is difficulty is in reading the Javadocs where no reference is made to the fact that the ServletRequest.getParameterMap() returns a String[] for the Value element. Steven -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
