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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:28:51+00:00 2026-05-27T06:28:51+00:00

In my jsp, I have some fields like this : <html:text property=field[0] value=${fieldValue} indexed=true>

  • 0

In my jsp, I have some fields like this :

<html:text property="field[0]" value="${fieldValue}" indexed="true">
<html:text property="field[1]" value="${fieldValue}" indexed="true">
<html:text property="field[2]" value="${fieldValue}" indexed="true">
<html:text property="field[3]" value="${fieldValue}" indexed="true">

And in my form I have a java.util.list that I need to populate from the fields on top :

private List<Double> field = new ArrayList<Double>();

public final List<Double> getField() {
    return field;
}
public final void setField(final List<Double> valeur) {
    this.field = valeur;
}

The problem is that the list is not populated.
Any ideas ???
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-05-27T06:28:52+00:00Added an answer on May 27, 2026 at 6:28 am

    Simply do this

    <html:text property="field[0]" value="${fieldValue}" indexed="true">
    <html:text property="field[1]" value="${fieldValue}" indexed="true">
    <html:text property="field[2]" value="${fieldValue}" indexed="true">
    <html:text property="field[3]" value="${fieldValue}" indexed="true">
    

    And in the form :

    private String[] field = new String[0];
    
    public final String getField(int index) {
        return field[index];
    }
    public final void setField(int index, String value) {
        //Copy last values of the array into a temporary array, then add the new value
        String[tmp] = new String[index + 1];
        for(int i=0; i<field.length; i++){
            tmp[i] = field[i];
        }
        tmp[index] = value;
        this.field = tmp;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one form in JSP. I have some input fields in that page,
I have webpage with a form like this: <html> <head> ... </head> <body> <form
I have this application I'm developing in JSP and I wish to export some
I have a JSP with some fields. When I fill in the fields and
I have a JSP and I want to fill some fields with information from
I have some JSP code, which writes a tree representing hierachical data. This data
I have this weird issue with special characters. In JSP, I am using field
I have a JSP program that displays a form where the user enters some
I have a combo of javascript and my jsp that is adding some text
I have some old jsp code that uses the struts tags inside attributes, like

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.