• 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

displaytag titleKey not fetching values from .properties file

Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a simple Servlet/JSP/JSTL project deployed on WebSphere 6.1.

I am using displaytag to do pagination. I want to assign column titles from resource bundles, hence I used titleKey attribute, but for some reason the values are not displayed.

Here is my displaytag code

Here is how I am setting my resource bundle (JSTL way),

My column titles just show Capitalized property names, that is title key is not working. But my JSTL fmt messages are properly displayed.

My properties file name is ApplicationResources_en.properties.

Can anyone please suggest why titleKey is not working here?


Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ran into a similar problem
I use an Spring/Struts application

1)the solution will be to add the Displaytag.properties to classpath say if you use an IDE add it to Src directory or if you are using a build script make it to fall in the classes directory

2) Displaytag.properties should have this entry

Struts: (say you are using a Applicationresources.properties)

similar way for other frameworks

Hope this helps others too who are facing this
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I was also facing this problem for Struts2 web application. Please use following steps to solve your problem

1) The solution will be to add the displaytag.properties to the path where ApplicationResource.properties is saved

2) displaytag.properties should have the below lines

3) Copy the below code to a new java class "I18nStruts2Adapter" at "com.web.displaytag.resourceslookup"(package path can be change as per your package structure) in your project.

Hope this will helps to other struts2 user who are facing this problem. Happy Coding !!!
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Urmi Garad
I'm new in struts2 and I did all things as you said but still doesn't work form

!!! can you help me?

Is anythings else to do ???
He baked a muffin that stole my car! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic