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 8703903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:58:13+00:00 2026-06-13T02:58:13+00:00

In the PHP when I click submit the server will get all the submit

  • 0

In the PHP when I click submit the server will get all the submit value via $_POST

So how can I do same like that with asp

<form name="submitForm" method="post" action="cart?action=update">
    <c:forEach var="product" items="${products}">
        <input type="text" name="${product.productID}" value="${product.quantity}" />
    </c:forEach>
    <input type="submit" value="Update" />
</form>

I want after submitting, I can get only one value in the servlet and the value consists multiple input value without give it a particular name.

I tried

System.out.println(request.getParameterValues("submitForm"));

But its null

Could anyone point me out ? Thanks

  • 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-06-13T02:58:13+00:00Added an answer on June 13, 2026 at 2:58 am

    I believe, ${product.productID} is having different value in each record. Use the values from here to get the values in the server side. e.g. if ${product.productID} results into productId1, productId2, prductId3...., retireve the values as:

          request.getParameter("productId1");
          request.getParameter("productId2");
          request.getParameter("productId3");
          ......
    

    If you are unsure about the names to retrieve, you may get them all parameter names using request.getParameterNames(). e.g. below:

        Enumeration<String> parEnumeration = request.getParameterNames();
        while (parEnumeration.hasMoreElements()) {
            String parameterName = parEnumeration.nextElement();
            String parameterValue = request.getParameter(parameterName);
            System.out.println("Parameter Name= " + parameterName);
            System.out.println("Parameter Value= " + parameterValue);
        }
    

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On page1.php I have a click event that causes the user to be redirected
Lets say for example: $(.button).click(function() { $.post(commandrunner.php, { param1: 'value', param2: 'value2', param3: 'value3'
I have created a php/mysql based chat page.It is like gmail chat.once i click
I try to implement the follwing code: <?php $yesno1=; $yesno2=; $option1=; $option2=; $option3=; if(isset($_POST['submit'])){
$(function() { $(.preview).click(function() { $('#image').wrap('<form action=/index/upload.php method=post enctype=multipart/form-data id=imageform target=imageupload />'); $('#imageform').submit(); $('#image').unwrap(); var
U have 2 images on a page and a textbox (php) When u click
I've build a drop down menu at: http://www.ourbridalsongs.com/new_header/header.php When you click on the up/down
$(.delete).click( function() { var thesender = this; $(thesender).text(Del...); $.getJSON(ajax.php, {}, function(data) { if (data[result])
$(#button_title_delete).click(function(){ jQuery.ajax({type:'POST', url:'delete.php', data: 'id='+$(bid).val(), success: function(veri) { $(#delete_result).html(veri);} }); }); When i click
I have a table generated by PHP/mysql, I want a user to click 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.