JavaServer Pages (JSP) and JSTL - Internationalization on jsp bases web sites - help needed
Anyone who have tried the code in below mentioned site, will be able to help me better but in case if you have not atleast take a look at my question and let me know whats missing?
http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp.html?page=1
On the above site, in page 7 he has given the instruction how to deploy his code, but he has not mentioned where to place .properties files? Because of some reasons I am getting following exception no matter where I pt my .properties file. Please let me know what am I missing or about location of the .properties file for this code.
If I choose english i get following exception:
java.util.MissingResourceException: Can't find bundle for base name Message
If i choose dutch
java.util.MissingResourceException: Can't find bundle for base name Message, locale de_DE
and so on for other languages.
Any kind of help will be appreciated.
[944 byte] By [
Mokshaa] at [2007-11-26 23:18:26]

# 1
All the Message.properties file need to go into the classpath.
In the case of a web application, put Messages.properties in the WEB-INF/classes directory.
Restart your server and run it again.
Note: The name of the bundle is specified by the call to ResourceBundle.getBundle. You can put your resource bundle in a package just like you can with java code.
eg
ResourceBundle.getBundle("Messages") looks for Messages.properties in the WEB-INF/classes directory
ResourceBundle.getBundle("com.myapp.Messages") looks for Messages.properties in the WEB-INF/classes/com/myapp directory.
This article is very old. You should probably NOT follow the example of putting all the translations into session.
The best way I know of right now is to use the JSTL tag <fmt:message>
Hope this helps,
evnafets
# 2
Thank you so much for your reply. Le me try as you suggested.
I have my jsp file saved in,
C:\Moksh\Moksh\DOWNLOADS\eclipse-SDK-3.2.1-win32\apache-tomcat-5.5.23\apache-tomcat-5.5.23\webapps\jswdk-1.0.1\examples\jsp\i18n
Should i put .properties file in
C:\Moksh\Moksh\DOWNLOADS\eclipse-SDK-3.2.1-win32\apache-tomcat-5.5.23\apache-tomcat-5.5.23\webapps\jswdk-1.0.1\examples\WEB-INF
# 3
I tried doing that by creating classes directory in
C:\Moksh\Moksh\DOWNLOADS\eclipse-SDK-3.2.1-win32\apache-tomcat-5.5.23\apache-tomcat-5.5.23\webapps\jswdk-1.0.1\examples\WEB-INF\
and then placed .properties files in it.
Still same error :( :( :(
i am tired of this, i want this to work anyhow.
I am not pro in jsp, so have no idea about your other suggestion of JSLT