aspose file tools
The moose likes Struts and the fly likes Internationalization of Struts program Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Internationalization of Struts program" Watch "Internationalization of Struts program" New topic
Author

Internationalization of Struts program

Rashid Darvesh
Ranch Hand

Joined: Feb 13, 2004
Posts: 189
hi i am planning to have different messages picked up from the aplication resouces properties file but it doesn't seem to work The ApplicationResources.properties file resides in my classes->com folder and there is an entry for this key as
app.title=CRS
but this <bean:message key="app.title" /> doesn't work.
The same happens to display an error besides html component
if the user name is empty then i add error as
errors.add("userID", new ActionError("error.userID.required"))
as per the book i have an entry for error.userID.required in teh resource file as
error.userID.required=<li>User ID cant be null</li>
and i try to print the error as <html:errors property="userID"/>

Lastly i have defined the mapping for the application resource file in the strutsconfig.xml as
<message-resources parameter="com.ApplicationResources" />
Any help will be appreciated
alex han
Ranch Hand

Joined: Dec 13, 2002
Posts: 46
Have you add
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
in your jsp?
Rashid Darvesh
Ranch Hand

Joined: Feb 13, 2004
Posts: 189
Yes, i did have the tag lib decleration at the beginning of the page
Rashid Darvesh
Ranch Hand

Joined: Feb 13, 2004
Posts: 189
hello. I am still unable to display the value from the application resources file. just dont know what's wrong with this. the only thing i get is some string like ???en_US.app.title??? . Can anyone help with this
The BigBarber
Greenhorn

Joined: Mar 30, 2004
Posts: 9
Have you added the ApplicationResources.properties file to the controller servlet in the web.xml file. as init-param
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Internationalization of Struts program
 
Similar Threads
An Unwanted Part of the XML Input File is Included in the XSL Transformation Result
Cannot find message resources ?
validation in nested:tags
Urgent !!! Entity bean JDBC connection Problem !!!
selecting pure text in jquery