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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:01:55+00:00 2026-06-17T17:01:55+00:00

I have a Stripes JSP with a <stripes:form> tag etc. I have a line

  • 0

I have a Stripes JSP with a <stripes:form> tag etc.
I have a line like the following one:

<span class='amount'>
    <fmt:formatNumber value="${MyJavaClass.amount}" type="number"/>
</span>

I know this is working fine in combination with the corresponding Stripes Action Bean.

Now I want to format that “amount” variable in a different way, i.e. being sure that at least 2 decimals are used.
For example:

199.1 becomes 199.10
362.44 remains 362.44

I thought that adding a formatPattern="decimal" would have been enough, according to Stripes documentation.
Please note that I want to keep the “number” format type, I do not want to change it to be a currency type.
Actually I am experiencing errors like the following one:

org.apache.jasper.JasperException: /MyJSPPath/MyJSP.jsp(19,6) Attribute formatPattern invalid for tag formatNumber according to TLD

How can I fix 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-17T17:01:55+00:00Added an answer on June 17, 2026 at 5:01 pm

    I fixed it setting properly the pattern parameter.

    <fmt:formatNumber value="${MyJavaClass.amount}" type="number" pattern="#.00"/>
    

    This was not enough:

    <fmt:formatNumber value="${MyJavaClass.amount}" type="number" maxFractionDigits="2"/>
    

    The issue related to only one digit was still there (i.e. “199.3” was still “199.3”, rather than “199.30”)

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

Sidebar

Related Questions

I have stripes:link tag in a jsp with an event attribute: <stripes:link href=${actionBean.context.currentStage.stripesForwardAction} addSourcePage=true
I have a jQuery selector like the following: $('.someClass div div .specificChildClass:nth-child(even)').addClass('alternateLine'); This stripes
I have the following Stripes ActionBean: package myapp; import net.sourceforge.stripes.action.*; public class WelcomeActionBean extends
I can pre-populate my Stripes JSP form with an object, client in my case,
Say I have the following for each in a stripes layout definition <c:foreach items=${foo}
I have two POJOs. class ZebraDAO { Long id; Mane mane; Tail tail; Stripes
I have this code form the book SCJP: 1. class Mammal { 2. String
I have the following resource tag in my context.xml file: <?xml version=1.0 encoding=UTF-8?> <Context
Currently, I have a Stripes form with a submit button that's binded to the
I have a Stripes website and I will have one page that will get

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.