D
Darrin
I keep getting a "Missing message for key..." error. Here is what the
application setup is:
1) I have an ApplicationResources.properties file located here:
\WEB-INF\classes\com\company\product\appname\ApplicationResources.properties
2) In my web.xml file I have the following entry:
<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>appname</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>com.company.product.appname.ApplicationResources</param-value>
</init-param>
3) In that ApplicationResources.properties file I have the following:
image.company=Company Name
4) My .jsp that requests the key is in the top level directory (same
level as WEB-INF). In that file I have this:
img src="Company_Logo.gif" align="left" alt="<bean:message
key="image.company"/>"
When I try to load it, I get: Missing message for key "image.company"
javax.servlet.jsp.JspException: Missing message for key
"image.company" at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:297)
at...
This is driving me crazy! I've tried copying the Application.Resources
file to every directory I could think of but nothing helps.
What am I doing wrong? All I could find on the net is this:
The key-value pair with specified key is not in
ApplicationResources.properties file
or
ApplicationResources.properties file not in classpath (not in
WEB-INF/classes directory in specified location)
Well, it is specified, and it is in the classpath.
Someone please tell me what I'm doing wrong!
Thanks!
application setup is:
1) I have an ApplicationResources.properties file located here:
\WEB-INF\classes\com\company\product\appname\ApplicationResources.properties
2) In my web.xml file I have the following entry:
<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>appname</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>com.company.product.appname.ApplicationResources</param-value>
</init-param>
3) In that ApplicationResources.properties file I have the following:
image.company=Company Name
4) My .jsp that requests the key is in the top level directory (same
level as WEB-INF). In that file I have this:
img src="Company_Logo.gif" align="left" alt="<bean:message
key="image.company"/>"
When I try to load it, I get: Missing message for key "image.company"
javax.servlet.jsp.JspException: Missing message for key
"image.company" at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:297)
at...
This is driving me crazy! I've tried copying the Application.Resources
file to every directory I could think of but nothing helps.
What am I doing wrong? All I could find on the net is this:
The key-value pair with specified key is not in
ApplicationResources.properties file
or
ApplicationResources.properties file not in classpath (not in
WEB-INF/classes directory in specified location)
Well, it is specified, and it is in the classpath.
Someone please tell me what I'm doing wrong!
Thanks!