Hi friends,
I m getting following exception when trying to use message bundle. I dont know if spring is able to find my message, which is in class folder of app.
EXCEPTION:
===========
org.springframework.context.NoSuchMessageException : No message found under code 'educationperiod.invalid.leapday.period.day' for locale 'en_US'.
org.springframework.context.support.DelegatingMess ageSource.getMessage(DelegatingMessageSource.java: 77)
org.springframework.context.support.AbstractApplic ationContext.getMessage(AbstractApplicationContext .java:630)
org.springframework.web.servlet.support.RequestCon text.getMessage(RequestContext.java:492)
org.springframework.web.servlet.support.BindStatus .getErrorMessages(BindStatus.java:172)
org.springframework.web.servlet.support.BindStatus .<init>(BindStatus.java:125)
org.springframework.web.servlet.tags.BindTag.doSta rtTagInternal(BindTag.java:115)
org.springframework.web.servlet.tags.RequestContex tAwareTag.doStartTag(RequestContextAwareTag.java:6 8)
org.apache.jsp.WEB_002dINF.jsp.main.setupperiod_js p._jspService(org.apache.jsp.WEB_002dINF.jsp.main. setupperiod_jsp:146)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:325)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel
Above exception occurs when I try to display errors through
<c:forEach items="${status.errorMessages}" var ="errorMessage">
<font color=red><c:out value="${errorMessage}" /><br></font>
</c:forEach>
.
My Message bundle
==============
school_en_US.properties
-----------------------------
educationperiod.invalid.normalday.period.day = Date cannot be greater than 28 for normal year
educationperiod.invalid.leapday.period.day = Date cannot be greater than 29 for leap year
Please kindly help to resolve the issue.
Thanks !!!
Aru K


Reply With Quote