Here I will explain you my requirement clearly.
In JSP I have one text box to enter the name and one dorpdown select box to choose the language:
Now user has to enter the name in text box and has to choose the language.
Once after he clicks on Submit....As you said am setting the locale in Action class based on the user selected language
and the Welcome message will be displayed in that particular language.
Here the Name is mandatory field since I am applying 'required' rule in validation.xml :
If the user didn't enter any name in that text box....the error message will be displayed in the choosen language (by default English).
To diaply the error message....if I simply put <html:errors/> in my JSP....its showing the English message only (even though I have selected other language and had set the locale in Action class).
From apache site link
, this is the description regarding locale attribute:
The session attribute key for the Locale used to select messages to be displayed. If not specified, defaults to the Struts standard value.
I dint understand how to use 'locale' attribute under html:errors .
Hope you understood my problem clearly.
Pls reply me.
[ November 21, 2006: Message edited by: Ja vardhan ]