aspose file tools
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
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: display value from resources file on jsp with struts tags?
 
Similar Threads
Websphere 4.0.4, Struts 1.1b2, "Cannot find message resources under key"
Missing message for key "welcome.title" in bundle "(default bundle)" for locale en_US
The requested resource (/asherstruts-project/) is not available
using Scriplets in JSP with Struts
struts problem