In PHP Page, to print array, we use print_r(); In jsp, to print string, out.print() is used. for example :
<?php print_r($_POST); ?>
was is equal in jsp??? How can we print array values in jsp?
In PHP Page, to print array, we use print_r(); In jsp, to print string, out.print() is used. for example :
<?php print_r($_POST); ?>
was is equal in jsp??? How can we print array values in jsp?
you can try
ObjectMapper mapper = new ObjectMapper();
System.out.println( mapper.defaultPrettyPrintingWriter().writeValueAsString(myList) );
myList is your array varible .
or for post data try
Map<String, String[]> parameters = request.getParameterMap();
for(String parameter : parameters.keySet()) {
if(parameter.toLowerCase().startsWith("your object name in html")) {
String[] values = parameters.get(parameter);
//your code here
}
}
and import java.util.Map