You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Myriam Boisjoli/CanWest/IBM <my...@ca.ibm.com> on 2002/02/23 22:45:32 UTC
can't find ApplicationResouce.properties
I am setting up the Struts example application with Visual Age 3.5.3. While
attempting to display index.jsp, the application can't seem to find the
strings in the ApplicationResources.properties file (specifically
<title><bean:message key="index.title"/></title>). While debugging the
RequestUtils.message method, I discovered that 'resources' always comes
back null which throws a JspException. Note that 'bundle' is not null.
// Look up the requested MessageResources
if (bundle == null)
bundle = Action.MESSAGES_KEY;
MessageResources resources = (MessageResources)
pageContext.getAttribute(bundle,
PageContext.APPLICATION_SCOPE);
if (resources == null) {
JspException e = new JspException
(messages.getMessage("message.bundle", bundle));
saveException(pageContext, e);
throw e;
}
I have set up the web.xml file as follows:
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>org.apache.struts.resources.ApplicationResources</param-value>
</init-param>
.....
and the ApplicationResources.properties file is in
/default_host/exercise/servlets/org/apache/struts/resources. This directory
is in the server class path.
Thanks! Myriam
Myriam Boisjoli - IT Specialist
e-business Integration - IBM Global Services
IBM Branch: (204)934-2642 myriamb@ca.ibm.com
Customer Site: (204)948-2928 mboisjoli@bsi.gov.mb.ca
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>