tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Elliott <ttoi...@mac.com>
Subject getParameterMap() question
Date Wed, 06 Feb 2002 18:40:16 GMT
Sorry if this is somewhat offtopic but maybe some experts here can help
clear this up for me.

I would like to use the ServletRequest.getParameterMap() in a JSP page using
the request object.

I post a form in the previous page using the POST method and the request in
processed with the following code:

Map map = request.getParameterMap();
Iterator itr = map.entrySet().iterator();
while (itr.hasNext()) {
    Map.Entry entry = (Map.Entry)itr.next();
    System.out.println(entry.getKey()+" = "+entry.getValue());
}

What gets printout is the following:

name = [Ljava.lang.String;@5349e2
surName = [Ljava.lang.String;@17d3f0
....etc.

So the key is correctly output but the value is not?  If I try this with
something like System.getProperties() both the key and value are output
correctly.

So what is the secret for making this work with the request object?

TIA

Steven


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message