-
1. Re: HttpServletRequest.getParameterMap ClassCastException
jules Oct 24, 2002 5:26 AM (in response to dharma_cris)try println(map.get("String")) and see what you get.
-
2. Re: HttpServletRequest.getParameterMap ClassCastException
dharma_cris Oct 24, 2002 2:20 PM (in response to dharma_cris)This works OK:
Enumeration enum = request.getParameterNames();
while(enum.hasMoreElements()){
String param = (String)enum.nextElement();
System.out.println(param + ":= " + request.getParameter(param));
} -
3. Re: HttpServletRequest.getParameterMap ClassCastException
dharma_cris Oct 24, 2002 2:46 PM (in response to dharma_cris)println(map.get("String")) gives [Ljava.lang.String;@46a658
-
4. Re: HttpServletRequest.getParameterMap ClassCastException
jules Oct 26, 2002 7:01 PM (in response to dharma_cris)[Ljava.lang.String is a String[].
From the 2.3 Servlet Spec :
getParameterMap()
public java.util.Map getParameterMap()
Returns a java.util.Map of the parameters of this request. Request para
are extra information sent with the request. For HTTP servlets, parame
are contained in the query string or posted form data.
Returns: an immutable java.util.Map containing parameter names as
and parameter values as map values. The keys in the parameter map ar
type String. The values in the parameter map are of type String array. -
5. Re: HttpServletRequest.getParameterMap ClassCastException
jules Oct 26, 2002 7:14 PM (in response to dharma_cris)let's try that paste again:
getParameterMap()
public java.util.Map getParameterMap()
Returns a java.util.Map of the parameters of this request. Request
parameters are extra information sent with the request. For HTTP
servlets, parameters are contained in the query string or posted form
data.
Returns: an immutable java.util.Map containing parameter names as keys
and parameter values as map values. The keys in the parameter map are
of type String. The values in the parameter map are of type String
array.