You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shaun Whyte <sw...@opaltelecom.co.uk> on 2002/07/19 18:48:51 UTC

Missing message for key - problem with ApplicationResources?

I am using the following:
- Apache Tomcat 4.0.4
- Struts 1.1 b1

There seems to be a problem accessing my ApplicationResources.properties
file as it throws the following exception from the MessageTag when I call
the JSP page:
javax.servlet.jsp.JspException: Missing message for key prompt.ordersfrom
at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:298)

This is being thrown from <bean:message key="prompt.ordersfrom"/> in my jsp.

In my struts-config.xml I have the line:
<message-resources parameter="ApplicationResources"/>

The ApplicationResources.properties file contains the keys it needs
(prompt.ordersfrom=xyz).
I have placed the ApplicationResources.properties file in the
/WEB-INF/classes directory within the webapp directory.

I have placed the struts.jar file in the /WEB-INF/lib directory and have
ensured it is the only copy of struts.jar within tomcat.  I am using xerces
1.4 as my xml parser.

I am using Log4j to log events and debug information, when the ActionServlet
is being initialised it gives the following output in the log:
2002-07-19 16:47:48,293 [ main] DEBUG org.apache.commons.digester.Digester -
[SetPropertiesRule]{struts-config/message-resources} Setting property
'parameter' to 'ApplicationResources'
2002-07-19 16:47:48,295 [ main] DEBUG
org.apache.commons.beanutils.BeanUtils -
BeanUtils.populate(MessageResourcesConfig[factory=org.apache.struts.util.Pro
pertyMessageResourcesFactorynull=true,parameter=null],
{parameter=ApplicationResources})
2002-07-19 16:47:48,296 [ main] DEBUG
org.apache.commons.beanutils.BeanUtils -   name='parameter',
value.class='java.lang.String', value='ApplicationResources'
2002-07-19 16:47:48,339 [ main] DEBUG
org.apache.commons.beanutils.ConvertUtils - Convert string
'ApplicationResources' to class 'java.lang.String'
2002-07-19 16:47:48,347 [ main] DEBUG org.apache.commons.digester.Digester -
[SetNextRule]{struts-config/message-resources} Call
org.apache.struts.config.ApplicationConfig.addMessageResourcesConfig(Message
ResourcesConfig[factory=org.apache.struts.util.PropertyMessageResourcesFacto
rynull=true,parameter=ApplicationResources])

I am not entirely sure if it is correctly loading the ApplicationResources
properties file or not, as on the second line it has 'parameter=null', but
is this something to do with the factory?

If anyone has any ideas why this is happening please let me know, as I'm
fast running out of them!

Thanks, Shaun.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>