Skip to main content
'getParameter()' changed into 'getParameterMap()'; cf. complete code example (and some formatting to exceed 6 characters that are necessary for an edit ;-) )
Source Link
Komal12
  • 3.4k
  • 4
  • 18
  • 25

You only need

request.getParameterMap()

for getting the POST and GET - Parameters.

The Method returns a Map<String,String[]>.

You can read the parameters in the Map by

 Map<String, String[]> map = request.getParameterMap();  //Reading the Map  //Works for GET && POST Method  for(String paramName:map.keySet()) {   String[] paramValues = map.get(paramName);     //Get Values of Param Name   for(String valueOfParam:paramValues) {   //Output the Values   System.out.println("Value of Param with Name "+paramName+": "+valueOfParam);   }  } 

You only need

request.getParameterMap()

for getting the POST and GET - Parameters.

The Method returns a Map<String,String[]>.

You can read the parameters in the Map by

 Map<String, String[]> map = request.getParameterMap();  //Reading the Map  //Works for GET && POST Method  for(String paramName:map.keySet()) {   String[] paramValues = map.get(paramName);     //Get Values of Param Name   for(String valueOfParam:paramValues) {   //Output the Values   System.out.println("Value of Param with Name "+paramName+": "+valueOfParam);   }  } 

You only need

request.getParameterMap()

for getting the POST and GET - Parameters.

The Method returns a Map<String,String[]>.

You can read the parameters in the Map by

Map<String, String[]> map = request.getParameterMap(); //Reading the Map //Works for GET && POST Method for(String paramName:map.keySet()) { String[] paramValues = map.get(paramName); //Get Values of Param Name for(String valueOfParam:paramValues) { //Output the Values System.out.println("Value of Param with Name "+paramName+": "+valueOfParam); } } 
'getParameter()' changed into 'getParameterMap()'; cf. complete code example (and some formatting to exceed 6 characters that are necessary for an edit ;-) )
Source Link

You only need

request.getParametergetParameterMap()

for getting the POST and GET - Parameters.

The Method returns a Map<String,String[]>Map<String,String[]>.

You can read the Paramsparameters in the Map by

 Map<String, String[]> map = request.getParameterMap(); //Reading the Map //Works for GET && POST Method for(String paramName:map.keySet()) { String[] paramValues = map.get(paramName); //Get Values of Param Name for(String valueOfParam:paramValues) { //Output the Values System.out.println("Value of Param with Name "+paramName+": "+valueOfParam); } } 

You only need

request.getParameter()

for getting the POST and GET - Parameters.

The Method returns a Map<String,String[]>.

You can read the Params in the Map by

 Map<String, String[]> map = request.getParameterMap(); //Reading the Map //Works for GET && POST Method for(String paramName:map.keySet()) { String[] paramValues = map.get(paramName); //Get Values of Param Name for(String valueOfParam:paramValues) { //Output the Values System.out.println("Value of Param with Name "+paramName+": "+valueOfParam); } } 

You only need

request.getParameterMap()

for getting the POST and GET - Parameters.

The Method returns a Map<String,String[]>.

You can read the parameters in the Map by

 Map<String, String[]> map = request.getParameterMap(); //Reading the Map //Works for GET && POST Method for(String paramName:map.keySet()) { String[] paramValues = map.get(paramName); //Get Values of Param Name for(String valueOfParam:paramValues) { //Output the Values System.out.println("Value of Param with Name "+paramName+": "+valueOfParam); } } 
Source Link
Arol
  • 62
  • 7

You only need

request.getParameter()

for getting the POST and GET - Parameters.

The Method returns a Map<String,String[]>.

You can read the Params in the Map by

 Map<String, String[]> map = request.getParameterMap(); //Reading the Map //Works for GET && POST Method for(String paramName:map.keySet()) { String[] paramValues = map.get(paramName); //Get Values of Param Name for(String valueOfParam:paramValues) { //Output the Values System.out.println("Value of Param with Name "+paramName+": "+valueOfParam); } }