Hi,
I meet the problems with files .properties.
My ApplicationResource.properties which defines "index.title=Page Title" is placed in WEB-INF/classes. And struts.jar is placed in "WEB-INF/lib". On test.jsp, I have that:
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@
page language="java"
import="java.util.*"
%>
<html:html locale="true">
<%
java.util.Locale locale = (java.util.Locale) session.getAttribute(org.apache.struts.action.Action.LOCALE_KEY);
if (locale == null) {
locale = java.util.Locale.getDefault();
}
String language = locale.getLanguage();
String localeStr = locale.toString();
%>
<meta http-equiv="Pragma" content="no-cache">
<bean:message key="index.title"/>
<html:base /> ...
But it throws an error when I called test.jsp. And it's really strange that i don't meet this error when using JBoss2.4.4. Please help me solve this problem
Stack Trace is:
javax.servlet.ServletException: Missing message for key index.title
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:240)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
.........
Hi penguin !
Did you set the application init-param for struts ActionServlet ? I'm using struts, too and never met any problems regarding the application-properties.
Hope it helps,
Jochen.