Hello
I do as you say but i dont know what is wrong :
in configuration i wrote:
PHP Code:
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="resourceLoader" >
<bean class="web.servlets.controller.ResourceBundleLoader">
</bean>
</property>
</bean>
and my ResourceBundleLoader:
PHP Code:
public class ResourceBundleLoader implements ResourceLoader{
@Override
public Resource getResource(String location) {
System.out.println("location: " + location);
ApplicationContext appContext = new ClassPathXmlApplicationContext("applicationContext.xml");
if(location == null)
{
System.out.println("Location == null ");
location = "file:/usr/local/storage/test/mainweb";
}
Resource resource = appContext.getResource(location);
if(resource == null)
{
System.out.println("resource == null ");
return null;
}else{
System.out.println("Resource != null");
}
return resource;
}
@Override
public ClassLoader getClassLoader() {
// TODO Auto-generated method stub
return null;
}
}
and i have got properties file in location "/usr/local/storeg/test/mainweb_en.properties"
So what i doing wrong ?
I hage got error in jboss:
PHP Code:
ERROR [org.springframework.web.servlet.tags.MessageTag] (http--127.0.0.1-8080-2) No message found under code 'TITLE' for locale 'en_US'.: javax.servlet.jsp.JspTagException: No message found under code 'TITLE' for locale 'en_US'.
at org.springframework.web.servlet.tags.MessageTag.doStartTagInternal(MessageTag.java:184) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:79) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.apache.jsp.WEB_002dINF.webpages.lupaband.main.Index_jsp._jspx_meth_spring_005fmessage_005f0(Index_jsp.java:113)
at org.apache.jsp.WEB_002dINF.webpages.lupaband.main.Index_jsp._jspService(Index_jsp.java:75)