| Author |
displaytag titleKey not fetching values from .properties file
|
Ajay Kamble
Ranch Hand
Joined: Jan 23, 2009
Posts: 51
|
|
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?
Regards,
Ajay
|
 |
Dilip Natarajan
Greenhorn
Joined: Apr 21, 2011
Posts: 1
|
|
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)
locale.provider=org.displaytag.localization.I18nStrutsAdapter
similar way for other frameworks
Hope this helps others too who are facing this
|
 |
Urmi Garad
Greenhorn
Joined: Jun 20, 2012
Posts: 3
|
|
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 !!!
|
 |
 |
|
|
subject: displaytag titleKey not fetching values from .properties file
|
|
|