wood burning stoves 2.0*
The moose likes Struts and the fly likes display value from resources file on jsp with struts tags? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "display value from resources file on jsp with struts tags?" Watch "display value from resources file on jsp with struts tags?" New topic
Author

display value from resources file on jsp with struts tags?

Liz Brown
Ranch Hand

Joined: Oct 22, 2002
Posts: 112
if i have a table name defined in my resources file. How to display it on jsp with the struts tags-html/bean/etc
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Use <bean:message/>


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Liz Brown
Ranch Hand

Joined: Oct 22, 2002
Posts: 112
could you please send me an example or link which shows how to use this tag with Resources file
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
If you have the following property in your ApplicationResources.properties file:

then the following tag should read the "foo.bar.FrontPageTitle" property and print it on the web page:


The ApplicationResources file must be somewhere on the classpath in order for Struts to find it. If, for example, you've deployed it at "WEB-INF/classes/ApplicationResources.properties", you need to specify the following in your struts-config.xml:

If you've deployed the file under a package structure, e.g. "WEB-INF/classes/com/company/foo/ApplicationResources.properties", then you need to reflect the location in your struts-config.xml accordingly:


Does that help?
Liz Brown
Ranch Hand

Joined: Oct 22, 2002
Posts: 112
thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: display value from resources file on jsp with struts tags?