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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:07:42+00:00 2026-05-23T03:07:42+00:00

I have a simple test project in Spring 3, basically a method within the

  • 0

I have a simple test project in Spring 3, basically a method within the controller that fetches data from an arraylist and “should” pass them to a view
Thsi is how the method looks like:

@RequestMapping(value="/showUsers")
public String showUsers(Model model){
    ArrayList<User> users=this.copy();
    model.addAttribute(users);
    return "showUsers";
}

And here’s the jsp (showUsers.jsp)

They both execute with no logs or warnings the view is displayed but without the ArrayList<User> data’s 🙁

<table align="center" border="1">
    <tr>
        <td>Nr:</td><td>Name:</td><td>Email</td><td>Modify?</td>
    </tr> 
    <c:forEach var="user" items="${users}" varStatus="status">
        <tr>
            <td><c:out value="${status.count}"/></td><td><c:out value="${user.name}"/></td>
            <td><c:out value="${user.email}"/></td><td>Modify</td>
        </tr>   
    </c:forEach>
</table>

Any advice?
Thank you!

  • 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-23T03:07:43+00:00Added an answer on May 23, 2026 at 3:07 am

    The Model documentation lists 2 methods for adding attributes to a Model. You are using the version without supplying a name, so Spring will use a generated name. I think this generated name is not what you think it is.

    You could add the model using model.addAttribute("users", users);

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

Sidebar

Related Questions

I have a simple test bash script which looks like that: #!/bin/bash cmd=rsync -rv
I have a simple test application (C# console application) that does an HTTP GET
I have a very simple unit test that just allocates a lot of Strings:
I have the following simple python test script that uses Suds to call a
I have this simple test project just to test the IncludeExceptionDetailInFaults behavior. public class
I have a Java Project in which I am writing a simple JUNIT test
I have simple test project which creates a frame and adds one JTextPane to
I have a simple little test app written in Flex 3 (MXML and some
I have created a simple test form with FormBorderStyle = FixedToolWindow by default and
I have written the following simple test in trying to learn Castle Windsor's Fluent

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.