This is what I have added in my spring-servlet.xml
<bean id="messageSource"
class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basename" value="classpath:application"/>
</bean>
and my application.properties file is inside src/main/resources folder, but am getting this exception
SEVERE: Servlet.service() for servlet [MVC-Dispatcher] in context with path [/MVCLayer] threw exception [javax.servlet.ServletException: javax.servlet.jsp.JspTagException: No message found under code 'Login_Username' for locale 'en_US'.] with root cause
javax.servlet.jsp.JspTagException: No message found under code 'Login_Username' for locale 'en_US'.
at org.springframework.web.servlet.tags.MessageTag.doEndTag(MessageTag.java:200)
Please help on what is wrong with the configuration
You should use value="application"
if you place your properties file inside the src/main/resources
folder
And of course make sure that the application.properties
file contains a line that starts with Login_Username=
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With