Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Retrieving All Parameters to a Java Servlet

DZone's Guide to

Retrieving All Parameters to a Java Servlet

Here's a really simple code snippet for retrieving parameters to a Java servlet.

· Java Zone ·
Free Resource

Build vs Buy a Data Quality Solution: Which is Best for You? Gain insights on a hybrid approach. Download white paper now!


    Map params = request.getParameterMap();
    Iterator i = params.keySet().iterator();

    while ( i.hasNext() )
      {
        String key = (String) i.next();
        String value = ((String[]) params.get( key ))[ 0 ];
      }


Build vs Buy a Data Quality Solution: Which is Best for You? Maintaining high quality data is essential for operational efficiency, meaningful analytics and good long-term customer relationships. But, when dealing with multiple sources of data, data quality becomes complex, so you need to know when you should build a custom data quality tools effort over canned solutions. Download our whitepaper for more insights into a hybrid approach.

Topics:
java ,java servlet

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}