aspose file tools
The moose likes Spring and the fly likes Spring MVC i18n problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "Spring MVC i18n problem" Watch "Spring MVC i18n problem" New topic
Author

Spring MVC i18n problem

Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 655
Hi

I am trying to do internalization in my sample Spring MVC 2.5 web app

mywebapp-servlet.xml



messages.properties


messages_en.properties


messages_de.properties


welcome.jsp



i have placed all properties files within WEB-INF folder along with mywebapp-servlet.xml.

When i am calling welcome.jsp on IE browser,i am getting below mentioned error
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspTagException: No message found under code 'welcome.title' for locale 'en_US'.


Please help me to solve this error


Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I
Christophe Verré
Marshal

Joined: Nov 24, 2005
Posts: 14361

Your resource bundles must be in your classpath. Put them under WEB-INF/classes.


[SCBCD Wall of Fame] [My Blog]
All roads lead to JavaRanch
Help Japan. Make a donation.
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 655
thanks for the quick reply.
Yes. it worked
Imre Tokai
Ranch Hand

Joined: Jun 04, 2008
Posts: 123
With this setup you can change the language in Browser's settings;

How can the language be changed on the web-page? EN DE ES...
What config modifications are required?


Regards
 
 
subject: Spring MVC i18n problem
 
Threads others viewed
WARN [org.springframework.web.servlet.PageNotFound]No mapping found for HTTP request, error-code404
spring form submission
ResourceBundle [/WEB-INF/messageresource/welcome] not found for MessageSource
Spring web flow: Not proceeding from first page to second page
Resource bundle properties file in Spring MVC
IntelliJ Java IDE