• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

getParameterNames() vs getParameterMap()  RSS feed

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

What's the difference between getParameterNames() and getParameterMap() while we can have the same result using one or another (We can extract pramater name and value from the quesry string without knwoning the prameter name previously)?

Thank you.
 
Author and ninkuma
Marshal
Posts: 66822
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One gives you a list (via old-fashioned Enumeration) of the parameter names, the other returns a Map implementation of the names and their values.

See: https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!