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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:21:55+00:00 2026-06-16T19:21:55+00:00

I have a list containing users. I am trying to print it in JSP

  • 0

I have a list containing users. I am trying to print it in JSP but some how I am not able to get it to print it. Getting this exception HTTP Status 500 - javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Neither BindingResult nor plain target object for bean name 'users[0]' available as request attribute

Code in JSP

<c:forEach items="${users}" var="user" varStatus="status">
   <spring:bind path="users[${status.index}].name">
      <c:out value="${status.value}" />
   </spring:bind>
</c:forEach>

Controller

ModelAndView modelAndView = new ModelAndView("go_some_JSP_page");
List<UserEntity> users = userManager.getAllObjects();
modelAndView.addObject("users", users);

BTW, UserEntity has name field. If I remove the binding and try to print the user.name using <c:out value="user.name" /> it prints the value

Where am I going wrong and what do I need to do? Thanks

Not working code below. [I have to invoke formatting on field @NumberFormat so have to try it using status variable]

<spring:bind path="user.name">
   <c:out value="${status.value}" />
</spring:bind>

Gets this error –> javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Neither BindingResult nor plain target object for bean name 'user' available as request attribute

So added a bean binding and then I get empty table :(. I believe thats because the instance is empty. So this does not seems like a right approach.

@ModelAttribute("user")
public UserEntity userEntityBinding() {
    return UserEntity.newInstance();
}

A working code exists at https://github.com/hth/StatusInvoke.git

Let me know if you face any problem deploying it.

This question has been solved. Thanks for looking at it.

  • 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-16T19:21:57+00:00Added an answer on June 16, 2026 at 7:21 pm

    The correct answer to invoke @NumberFormat annotation is by using spring:eval expression tag

    <spring:eval expression="user.balance" />
    

    This invokes the annotation and performs formatting as mentioned in the annotation

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

Sidebar

Related Questions

I have a list containing users. I am trying to print it in JSP
I have a listbox containing Users. The datasource is an generic list of the
Say I have a list containing strings that look like this: 00x000s00g00wfds0d dkdf00sdf00sdfg00jk kf00dfjkd0sdl0sd0f0
I have a SELECT LIST MENU containing products and on this menu i use
I'm trying to dynamically create variables if possible. I have a list box containing
I have a list containing a tuples and long integers the list looks like
I have a list containing version strings, such as things: versions_list = [1.1.2, 1.0.0,
I have a list containing about 1000 file names to search under a directory
I have a dropdown list containing the days of the week - Monday to
I have a stl::list containing Widget class objects. They need to be sorted according

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.