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

  • Home
  • SEARCH
  • 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 8768921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:11:38+00:00 2026-06-13T17:11:38+00:00

I want to send the list of objects from jsp to controller. Actually i

  • 0

I want to send the list of objects from jsp to controller.

Actually i had User enity and it has one to many relationship with Address enity.
My jsp is as follows :

<div class="label"><b>First Name :</b></div>
                    <div class="leftSide"><input type="text" name="firstName" class="textBox" style="width:250px;" /></div>
                    <div class="clr ht5"></div>

                    <div class="label"><b>Company :</b></div>
                    <div class="leftSide"><input type="text" name="company" class="textBox" style="width:250px;" /></div>
                    <div class="clr ht5"></div>
                 </div>
                 <div class="rightHalfColumn">
                    <div class="label"><b>Last Name :</b></div>
                    <div class="leftSide"><input type="text" name="lastName" class="textBox" style="width:250px;" /></div>
                    <div class="clr ht5"></div>

                    <div class="label"><b>Email Address :</b></div>
                    <div class="leftSide"><input type="text" name="email" class="textBox" style="width:250px;" /></div>
                    <div class="clr ht5"></div>

                    Address 1
                    <div class="label"><b>Address 1 :</b></div>
                    <div class="leftSide"><input type="text" name="address1" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>City :</b></div>
                    <div class="leftSide"><input type="text" name="city" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>Zipcode :</b></div>
                    <div class="leftSide"><input type="text" name="zipcode" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>Address 2 :</b></div>
                    <div class="leftSide"><input type="text" name="address2" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>State :</b></div>
                    <div class="leftSide"><input type="text" name="state" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>Phone :</b></div>
                    <div class="leftSide"><input type="text" name="phone" class="textBox" style="width:250px;" /></div>


                    Address 2
                    <div class="label"><b>Address 1 :</b></div>
                    <div class="leftSide"><input type="text" name="address1" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>City :</b></div>
                    <div class="leftSide"><input type="text" name="city" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>Zipcode :</b></div>
                    <div class="leftSide"><input type="text" name="zipcode" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>Address 2 :</b></div>
                    <div class="leftSide"><input type="text" name="address2" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>State :</b></div>
                    <div class="leftSide"><input type="text" name="state" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>Phone :</b></div>
                    <div class="leftSide"><input type="text" name="phone" class="textBox" style="width:250px;" /></div>


                    Address 3
                    <div class="label"><b>Address 1 :</b></div>
                    <div class="leftSide"><input type="text" name="address1" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>City :</b></div>
                    <div class="leftSide"><input type="text" name="city" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>Zipcode :</b></div>
                    <div class="leftSide"><input type="text" name="zipcode" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>Address 2 :</b></div>
                    <div class="leftSide"><input type="text" name="address2" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>State :</b></div>
                    <div class="leftSide"><input type="text" name="state" class="textBox" style="width:250px;" /></div>

                    <div class="label"><b>Phone :</b></div>
                    <div class="leftSide"><input type="text" name="phone" class="textBox" style="width:250px;" /></div>

Here i have three Address like. Address1, Address2 and Address3

now I get the User info at @ModelAttribut("user") User user but i didnt get the addresses list from user.getAddress();.
It returns the “[]” empty value for addresslist.
How could i get this list of address objects from jsp to controller.

Can anyone help me please..

  • 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-13T17:11:39+00:00Added an answer on June 13, 2026 at 5:11 pm

    It described in documentation, just read section about nesting properties.

    For provided case you need to set field names properly:

    • user.address[0].city
    • user.address[1].city
    • user.address[2].city

    This code will set cities for 3 address of user. Do similar transformation with other fields.

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

Sidebar

Related Questions

I want to send a list of User object into action, while user has
I have a list of person objects which I want to send in response
I want to send array of my own objects to JSP page by request.
Hello Sir i want send list of data to php server i use following
Possible Duplicate: Upcasting and generic lists Ok, I want to send a List<CardHolder> as
I created the list that have device detected, and I want to send data
I have a TextInput and a List in my application. I want to send
i want to display a list of emails to whom i send an email
In my application i want send a email to one account.in one button click
Want to send the text from my current vb application to the Active Window

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.