Results 1 to 3 of 3

Thread: Unable to get Message Resolver to work properly

Hybrid View

  1. #1

    Default Unable to get Message Resolver to work properly

    I have two files message.properties & message_en_GB.properties in my WEB_INF directory they both contain the following
    Code:
    validation.1=Please check the data you have entered is correct
    validation.2=This value cannot be left blank
    My Spring config file is in the same dir and references the files with
    Code:
    <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
          <property name="basename"><value>message</value></property>
       </bean>
    In one of my validators I have the code
    Code:
    errors.rejectValue&#40;"description","validation.2","Use Default"&#41;;
    and
    Code:
    errors.rejectValue&#40;"description","validation.2"&#41;;
    If the first one is triggered it works ok displaying the default message. But if the second one is triggered it fails with
    Code:
    Error 500&#58; No message found under code 'validation.2' for locale 'en_GB'.
    I cant understand what Im doing wrong.

    (The Application is running as an EAR on Websphere 6)

  2. #2
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    Did you try putting *.properties files into your classes dir?

  3. #3

    Default

    Quote Originally Posted by dejanp
    Did you try putting *.properties files into your classes dir?
    Thankyou very much, that works !

    (Im sure the dodumentation told me to put stuff straight into WEb-INF though)

Similar Threads

  1. Message Bundle - No Message Found exception
    By arumugamkasi in forum Web
    Replies: 18
    Last Post: Jun 20th, 2011, 04:24 AM
  2. Beandoc crashing (on its samples!)
    By aaime in forum Container
    Replies: 17
    Last Post: Oct 7th, 2005, 07:21 AM
  3. UpgradeAcegi Security System from 0.6.1 to 0.8.3
    By mannobug in forum Security
    Replies: 3
    Last Post: Sep 23rd, 2005, 07:00 PM
  4. Channel and message transformation question
    By Alarmnummer in forum Architecture
    Replies: 12
    Last Post: May 11th, 2005, 05:06 PM
  5. Displaying Error from message resource
    By qtipz4ever in forum Web
    Replies: 3
    Last Post: Mar 16th, 2005, 04:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •