Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7576419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:54:57+00:00 2026-05-30T16:54:57+00:00

In my spring-servlet.xml I have <bean id=messageSource class=org.springframework.context.support.ReloadableResourceBundleMessageSource> <property name=basename value=/WEB-INF/messages /> </bean> My

  • 0

In my spring-servlet.xml I have

<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
    <property name="basename" value="/WEB-INF/messages" />
</bean>

My messages.properties file is inside my WEB-INF/classes and its named as messages_EN.properties which contains like

login.userName=Username.
login.password=pssword.

My jsp file has

 <%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
 <%@taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>

 <html> 
<head> 
 <title> Login </title>
 </head> 
 <body>
 <form:form method="post" action="home.htm">
  <label> <spring:message code="login.userName"/></label>
 </form:form>
 </body>
 </html>

when I run this I am getting the below error message

  No message found under code 'login.userName' for locale 'en_GB'.

If anyone can help me where I am wrong. Also if I need to change to some other language then what I need to do?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:54:58+00:00Added an answer on May 30, 2026 at 4:54 pm

    You have a problem in the location config of your message.properties file.

    If the file is located under the WEB-INF/classes directory, then the Spring config should be :

    <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
        <property name="basename" value="WEB-INF/classes/messages" />
    </bean>
    

    And the name of the file should be either :

    • messages.properties
    • messages_en.properties
    • messages_en_GB.properties
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

spring-servlet.xml setting up theme beans: <bean id=themeSource class=org.springframework.ui.context.support.ResourceBundleThemeSource> <property name=basenamePrefix value=theme- /> // also
In my appname-servlet.xml I have: <!-- freemarker config --> <bean id=freemarkerConfig class=org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer> <property name=templateLoaderPath
I have a spring mvc project set up like so: <servlet> <servlet-name>appServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param>
Spring: In my context.xml, I have: <util:set id=someIDs set-class=java.util.HashSet value-type=java.lang.String> <value>W000000001</value> <value>W000000003</value> <value>W000000009</value> </util:set>
I have an entry in my servlet.xml , xmlns:dwr=http://www.directwebremoting.org/schema/spring-dwr Now, what I think is,
I notice that there is getWebApplicationContext in org.springframework.web.servlet.mvc.AbstractController . This means that spring programmers
i'm using Spring-WS and have the following spring-ws-servlet.xml file. The injection of defaultURI and
I have a webapp in which I define the basic dispatcher-servlet context in web.xml
I'm new to Spring MVC and have the following situation: In WEB-INF/demoshop-servlet.xml I have
I have a dispatcher-servlet.xml and an applicationContext.xml. I have been doing some refactoring, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.