I am using struts-1.2.9.jar. In my validation.xml, I have the following:
I have there resource called "web" mapped out in my struts-config.xml as :
When I try to access my page, the validator fails to find the bundle with the stack trace shown below. Why is my validator tag not picking up the resource file. It works great otherwise if I comment out the validator code.
Thanks in advance for any suggestions.
javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1189) at org.apache.struts.taglib.html.JavascriptValidatorTag.createDynamicJavascript(JavascriptValidatorTag.java:433) at org.apache.struts.taglib.html.JavascriptValidatorTag.renderJavascript(JavascriptValidatorTag.java:393) at org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:349) at org.apache.jsp.WEB_002dINF.pages.login_jsp._jspx_meth_html_javascript_0(org.apache.jsp.WEB_002dINF.pages.login_jsp:509) at org.apache.jsp.WEB_002dINF.pages.login_jsp._jspx_meth_html_form_0(org.apache.jsp.WEB_002dINF.pages.login_jsp:331) at org.apache.jsp.WEB_002dINF.pages.login_jsp._jspx_meth_html_html_0(org.apache.jsp.WEB_002dINF.pages.login_jsp:226) at org.apache.jsp.WEB_002dINF.pages.login_jsp._jspService(org.apache.jsp.WEB_002dINF.pages.login_jsp:113) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
Never be satisfied with anything less than the best and you will surely pass the test...
This entry is intended to point to a resource bundle, which could consist of any number of language-specific files. It's not intended to point to individual files.
Unless you're planning to have more than one resource bundle, I'd suggest removing the key attribute. That way you don't have to specify a bundle name every time you use a message.