JAVA. HttpServletRequest mostrar todos los parametros recibidos.
protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
// TMP debug
HashMap parametros = (HashMap) req.getParameterMap();
Iterator it = parametros.entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry)it.next();
System.out.println(entry.getKey()+"="+entry.getValue());
}
// FIN TMP debug
}
==================================================
for ( Iterator iterator = aMap.entrySet ( ) .iterator ( ) ; iterator.hasNext ( ) ; ) {
Map.Entry entry = ( Map.Entry ) iterator.next ( ) ;
String key = ( String ) entry.getKey ( ) ;
String value = ( String ) entry.getValue ( ) ;
}
// TMP debug
HashMap parametros = (HashMap) req.getParameterMap();
Iterator it = parametros.entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry)it.next();
System.out.println(entry.getKey()+"="+entry.getValue());
}
// FIN TMP debug
}
==================================================
for ( Iterator iterator = aMap.entrySet ( ) .iterator ( ) ; iterator.hasNext ( ) ; ) {
Map.Entry entry = ( Map.Entry ) iterator.next ( ) ;
String key = ( String ) entry.getKey ( ) ;
String value = ( String ) entry.getValue ( ) ;
}
Comentarios
Publicar un comentario