Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to use getText() in JSP

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.....

I am creating my application using struts2...
I have define variable parameters in my .properties file....

the code of properties file is:

ordercheckout.creditholdflagbusiness1.message1=The order total $ {0} exceeds this account's credit limit of $ {1}

Now i want to use this label in my JSP page....

I have written a code lyk this in JSP....

<s:text name="%{getText('ordercheckout.creditholdflagbusiness1.message1',{#session.openOrder.orderTotal,#session.selectedServiceLocation.businessId.creditLimit})}" />

but it is showing me output like this....

The order total $ 2,748,586.5 exceeds this accounts credit limit of $ {1}

what sholud i do???


Help me...
Thank you in advance....


 
Just let me do the talking. Ahem ... so ... you see ... we have this tiny ad...
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic