As said earlier that html does not support locale attribute and you suggested to use lang attribute.i did accordingly but still i arise with this exception Missing message for key "welcome.title" in bundle "(default bundle)" for locale en_US
and i have wriiten this code in messageresource property # -- welcome -- welcome.title=Struts Blank Application welcome.heading=Welcome! welcome.message=To get started on your own application, copy the struts-blank.war to a new WAR file using the name for your application. Place it in your container's "webapp" folder (or equivalent), and let your container auto-deploy the application. Edit the skeleton configuration files as needed, restart your container, and you are on your way! (You can find the application.properties file with this message in the /WEB-INF/src/java/resources folder.)
error.keyword.required=Search Key Word is required
but still arising with the same exception please help me in how to proceed further
Please post your struts-config.xml file and the JSP you are trying to display when this error occurs. Also indicate where you have placed your message resources properties file and what the name of it is.
In a misplaced post, you indicated that the following entry exists in your struts-config.xml file.
The first thing wrong here is that you can only have one default message resource. If you want to have additional message resources, they must each have a unique key specified using the key attribute. Only the one default message resource does not need a key attribute.
The second problem is that you've specified package names for your resource files, but (again from your misplaced post) I understand that you placed the resource file in the root of the classes directory. If you specify a package, you must build a directory structure matching the package, just as you do with Java classes. And by the way.. that package name should never be java.
My suggestion is to change the entry in your struts-config.xml file to:
That way it will match what you already have in your classes directory and your JSP should work.
I got the same problem (only with locale de) for blimey demo from a training course. And instead of concentrating on my course I now have to fix this stupidity. Why is Struts not just using the default language instead of a annoying error message? So from the course I take home: ”Struts is difficult to use better stick with POS (Plain Old Servlets) and JSP”.
Enough of ranting. Has anybody got a quick fix for this problem? Remember: just a throw away demo - no need for proper fix with real multi language support.