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 6621837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:19:23+00:00 2026-05-25T21:19:23+00:00

My applicationContext.xml is in path: src/main/resources/META-INF/spring and property files are in path: src/main/resources/messages and

  • 0

My applicationContext.xml is in path:

src/main/resources/META-INF/spring

and property files are in path:

src/main/resources/messages

and I load spring context in web.xml as follows:

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:META-INF/spring/applicationContext.xml</param-value>
</context-param>

when I am configuring MessageSource and PropertyPlaceholderConfigurer as follows:

<bean id="propertyPlaceholderConfigurer"
      class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="locations">
        <list>
            <value>classpath:messages/apps.properties</value>        
        </list>
    </property>
</bean>

<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
    <property name="basenames">
        <list>
            <value>classpath:messages/ValidationMessages</value>
            <value>classpath:messages/app</value>
        </list>
    </property>
    <property name="defaultEncoding" value="UTF-8"/>
</bean>

they both don’t work, it only works when I change classpath to classpath*
Any ideas why?

  • 1 1 Answer
  • 0 Views
  • 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-25T21:19:23+00:00Added an answer on May 25, 2026 at 9:19 pm

    From Spring documentation:

    4.7.2.2 The classpath*: prefix

    […] location string may use the special classpath*: prefix: […]

    This special prefix specifies that all classpath resources that match the given name must be obtained […], and then merged to form the final application context definition.

    Are you sure there are no other messages/apps.properties files on your CLASSPATH coincidentally taking precedence and overriding your file? This description suggests that you might have several same named files that are merged when * is used.

    Can you check this by calling:

    SomeClass.class.getClassLoader().getResources("/messages/apps.properties");
    

    ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating my Spring context inside a static main method with return new ClassPathXmlApplicationContext(applicationContext.xml);
I need the context to ApplicationContext.xml ,which I provided in web.xml as <listener> <listener-class>
I have an ApplicationContext.xml file with the following node: <context:property-placeholder location=classpath:hibernate.properties, classpath:pathConfiguration.properties /> It
I have a web application that's based on Spring and the application contexts, applicationContext.xml
I use: <context:property-placeholder location=file:${PROJECT_CONFIG_PATH}/project.conf /> in my applicationContext.xml to get local config (one for
I have working web-application with applicationContext.xml in WEB-INF/config/applicationContext.xml. Now i need to implement some
I need to load a specific applicationContext.xml file according to a given system property.
when i put struts.xml in web-inf it is showing error......when i put in src
In spring you can initialize a bean by having the applicationContext.xml invoke a constructor,
Eclipse is showing the following errors in my Spring's applicationContext.xml : cvc-complex-type.2.4.c: The matching

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.