• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Default value in RT Exp formater

 
Ranch Hand
Posts: 326
Android Mac OS X Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am currently cleaning up some messy JSP-code, introducing JSTL and Struts taglibs.

We have a lot of code that looks like this:

where we get at text from a bean or request attribute and output it on the screen but use a default value if the provided attibute is null.

Our current string formater looks like this:


Is there a way to use the format or formatKey-part of <bean:write>-tag to output a default value if null?

I've created formatKeys for the decimal, data and other formated data, but I can't get the normal String-format to work.
reply
    Bookmark Topic Watch Topic
  • New Topic