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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:43:15+00:00 2026-05-16T00:43:15+00:00

I am having some strange problem and its really frustating me. I have a

  • 0

I am having some strange problem and its really frustating me. I have a list of Car bean in request attribute –

List<Car> cars = myservice.getCars();
request.setAttribute("cars", cars);

When I print the car ids (long type), it gives me correct value –

for(Car car: cars) {
 System.out.println(car.id);
}
// It gives me - 11231, 11245, 11253

But when I am trying to get same on freemarker page resutl.ftl, its giving me values as –

11,231 
11,245
11,253

The code is –

<#list cars as car>
 <span>Car Id:</span>${car.id}
<#list>
  • 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-16T00:43:16+00:00Added an answer on May 16, 2026 at 12:43 am

    Formatting of numbers appears to be locale-sensitive. This FAQ entry appears to give a fix:

    http://freemarker.sourceforge.net/docs/app_faq.html#faq_number_grouping

    From that page (and that page alone, I’d never heard of Freemarker before your question), it seems that this might do what you want:

    <span>Car Id:</span>${car.id?c}
    

    Or you could adjust your locale settings or number format to be something more like you expect. Exactly how to do that is detailed in the link above.

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

Sidebar

Related Questions

I'm having a really strange problem. I'm trying to download some file and store.
I'm having a strange problem that is affecting at least some of my international
I'm having a strange problem with ZeroMQ, in which some messages get stuck, and
I've been having some strange errors lately. I have a working install of Git,
I'm having a strange problem with SSIS. I'm exporting some data from a database
I’m having some strange problem with my JS program. I had this working properly
I have some strange restrictions on the following problem. (My friends aren't very good
I'm having a strange problem deserializing and was wondering if someone could shed some
I am having a kinda strange problem. Here is the situation. I have a
I'm having a strange problem here... I have an ASP.NET 3.5 application that has

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.