Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 644871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:26:26+00:00 2026-05-13T21:26:26+00:00

I have a number of textboxes that will be displayed with their existing values.

  • 0

I have a number of textboxes that will be displayed with their existing values. I want my servlet to be able to get all their values and then update the database with the the values that have changed.

How do I get the values? Is there some way to put them into a HashMap with the id or name as the key and the value of the textbox as the value for the key?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:26:26+00:00Added an answer on May 13, 2026 at 9:26 pm

    If you’re giving all of the text boxes the same name, you can get a String[] of the values via ServletRequest.getParameterValues.

    If you want to get all of your submitted fields in a single map, you can use ServletRequest.getParameterMap to get a Map of all of the parameters submitted. Each individual parameter’s value in the map is a String[].

    Here’s some sample code that walks through all submitted parameters and all of their values:

    Iterator    it;
    Map         params;
    String      name;
    String[]    values;
    int         n;
    
    params = request.getParameterMap();
    it = params.keySet().iterator();
    while (it.hasNext())
    {
        name = (String)it.next();
        values = (String[])params.get(name);
        for (n = 0; n < values.length; ++n)
        {
            // ...use value[n]...
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to have a number that's displayed on a web page that will
I have an asp:TextBox and I want to validate that the number of characters
I have a DetailsView with a number of textboxes setup with RequiredFieldValidators. The code
I have a WPF user control with a number of textboxes, this is hosted
I have a dialog with a number of Alt-Letter shortcuts on labels for textboxes/etc.
i have a repeater that is bound to a number of custom dataitems/types on
I have 2 textboxes and a label on my page. The 2 textboxes will
I have a Windows Mobile Desktop Application that have some text fields which will
Here's a scernerio that will get what I am trying to accomplish.... Say I
I have a form that contains two input textboxes, one called serial and the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.