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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:47:03+00:00 2026-05-22T22:47:03+00:00

I suppose that everybody that uses spring, uses form binding and validation. And you

  • 0

I suppose that everybody that uses spring, uses form binding and validation. And you all defined the messages to display on validation errors. I did it with this in my config:

<bean id="messageSource"
        class="org.springframework.context.support.ResourceBundleMessageSource"
        p:basename="messages" />

what will happen basically is that it will read messages.properties in my root folder of the project.

But I’d need to put messages in two separate files. Because one part of the app has to be standalone. I tried adding this just after the one above:

<bean id="messageSourceAssistenza"
        class="org.springframework.context.support.ResourceBundleMessageSource"
        p:basename = "com.mypackage.other.assistenzamessages.properties"
        />

but it can’t resolve those messages at all. How to solve this?

  • 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-22T22:47:03+00:00Added an answer on May 22, 2026 at 10:47 pm

    You should be able to use ResourceBundleMessageSource.setBasenames that accepts array of base names:

    Set an array of basenames, each
    following ResourceBundle conventions:
    essentially, a fully-qualified
    classpath location. If it doesn’t
    contain a package qualifier (such as
    org.mypackage), it will be resolved
    from the classpath root.

    The associated resource bundles will
    be checked sequentially when resolving
    a message code. Note that message
    definitions in a previous resource
    bundle will override ones in a later
    bundle, due to the sequential lookup.

    Sample configuration as follows:

    <bean id="messageSource"
        class="org.springframework.context.support.ResourceBundleMessageSource">
        <property name="basenames">
            <list>
                <value>messages_1</value>
                <value>messages_2</value>
                ...
                <value>messages_n</value>
            </list>
        </property>
    </bean>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose that I have a simple form in my page like this : <form
Suppose that I have a Java program within an IDE (Eclipse in this case).
Suppose that for every Form in a WinForms application, you want to change the
suppose that I have this RDBM table ( Entity-attribute-value_model ): col1: entityID col2: attributeName
Suppose that I have the model Foo in GAE and this query: query =
Is 'eval' supposed to be nasty? inspired this one: Mostly everybody agrees that eval
suppose that you have a webpage that uses the post and get method, and
Suppose that I have a class like this class Employee: pass I create two
Everybody knows that you can access a variable in PHP using this: ${'varName'}. But
Suppose that I have the following python base class: class BaseClass(object): def a(): This

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.