Get all updates of Java4s
Follow Us: Email Newsletter

Example on getParameterValues() method of Servlet Request

Servlets » On Jan 28, 2013 { 7 Comments } By Sivateja

The method getParameterValues() will generally came into picture if there is a chance of getting multiple values for any input parameter, this method will retrieve all of it values and store as string array.


String[] values = getParameterValues(“Input Parameter”);

Directory Structure

Files Required

  • index.html
  • web.xml





You Might Also Like

  ♦ About Author ♦

Full Stack( Java/J2EE & UI/UX ) Developer and founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog. Sign-up for the Email Newsletter for your daily dose of Java tutorials.


7 Responses to “Example on getParameterValues() method of Servlet Request”
  1. Nagendra says:

    What is the difference between getParameterMap() and getParameterValues() ?

  2. jaysheel says:

    sir i am doing the same thing but the checkboxes are dynamically generated and want to get the values of several checkboxes to other servlet.
    Please help as soon as possible

  3. siva reddy says:

    How can i store those values in database

  4. Akanksha says:

    Helpful code.I was stuck since long.
    By the snippet
    String[] values=req.getParameterValues(“habits”);

    It solved.

  5. Bansari Wangde says:

    What changes need to be done if I have multiple html files.Suppose I have to jump from one html to another depending on user choice and then call the .java file then the above code doesnot work. So please let me know what changes are to be done.

  6. deepak says:

    Explanation of each and every topic is simply superb sir.
    thank you sir

  7. vinay satam says:

    nice very useful for begin


By posting your answer, you agree to our comments policy.
What would you like to learn today?
Browse these popular technologies
Hibernate spring struts Servlets ajax Log4j jQuery Json Core Java Web Services AngularJs
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Useful Links Current & UpComing Tutorials
  Web Services [ SOAP ], JSP
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2016 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.