sakthikams
May 5th, 2008, 02:33 PM
Hi,
I'm using struts <bean:message> tag in my jsp and I'm trying to load message resources thro' Spring's ApplicationContext. But I'm ended with the error message :confused:
================================================== ==========================
Cannot find message resources under key resources.Title
================================================== ==========================
Here is the entry from <b>applicationContext
===============================================
<bean id="messageSource" class="org.springframework.context.support.ResourceBundle MessageSource">
<property name="basenames">
<list>
<value>resources.images</value>
<value>resources.Title</value>
</list>
</property>
</bean>
Here is the code snippet from <b>JSP page
<bean:message key="title.company" bundle="resources.Title" />
__________________________________________________ _________
With above just to add that my requirement is, i don't want to use Action Servlet to load Message Resources. I need to achieve this without using ActionServlet struts-config.xml. You may wonder that Why? The fact is that all these JSPs are [nearly 400 JSPs] already developed using Struts. hence if i start to use <spring:message> or JSTL's <fmt:message> i need to change all these files.
Is it possible to use the struts tag to access MessageResources loaded by Spring ApplicationContext? Can i use like these or not? Your suggestions or ideas will be greatly appreciated.
Thanks, KAMS
I'm using struts <bean:message> tag in my jsp and I'm trying to load message resources thro' Spring's ApplicationContext. But I'm ended with the error message :confused:
================================================== ==========================
Cannot find message resources under key resources.Title
================================================== ==========================
Here is the entry from <b>applicationContext
===============================================
<bean id="messageSource" class="org.springframework.context.support.ResourceBundle MessageSource">
<property name="basenames">
<list>
<value>resources.images</value>
<value>resources.Title</value>
</list>
</property>
</bean>
Here is the code snippet from <b>JSP page
<bean:message key="title.company" bundle="resources.Title" />
__________________________________________________ _________
With above just to add that my requirement is, i don't want to use Action Servlet to load Message Resources. I need to achieve this without using ActionServlet struts-config.xml. You may wonder that Why? The fact is that all these JSPs are [nearly 400 JSPs] already developed using Struts. hence if i start to use <spring:message> or JSTL's <fmt:message> i need to change all these files.
Is it possible to use the struts tag to access MessageResources loaded by Spring ApplicationContext? Can i use like these or not? Your suggestions or ideas will be greatly appreciated.
Thanks, KAMS