You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "G.L. Grobe" <ga...@grobe.org> on 2001/04/13 04:25:54 UTC

help with 'message key="main.title"

I've included the error, web.xml, and a partial of index.jsp with short
explanation just before each. I'm getting this error when I browse to my
index.jsp file.

500 Internal Server Error
javax.servlet.jsp.JspException: Missing message for key main.title at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java,
Compiled Code) at /index.jsp._jspService(/index.jsp.java, Compiled Code) at
com.orionserver.http.OrionHttpJspPage.service(JAX, Compiled Code) at
com.evermind.server.http.HttpApplication.xj(JAX, Compiled Code) at
com.evermind.server.http.JSPServlet.service(JAX, Compiled Code) at
com.evermind.server.http.d3.sw(JAX, Compiled Code) at
com.evermind.server.http.d3.su(JAX, Compiled Code) at
com.evermind.server.http.ef.s1(JAX, Compiled Code) at
com.evermind.server.http.ef.do(JAX, Compiled Code) at
com.evermind.util.f.run(JAX, Compiled Code)

Here is my web.xml. In the <init-param> application line, I have cais and
cais.properties is in my ~/WEB-INF/classes dir.

----------- web.xml -------------------
   <servlet>
      <servlet-name>action</servlet-name>
      <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
      <init-param>
         <param-name>application</param-name>
         <param-value>cais</param-value>
      </init-param>
      <init-param>
         <param-name>config</param-name>
         <param-value>/WEB-INF/struts-config.xml</param-value>
      </init-param>
      <init-param>
         <param-name>validate</param-name>
         <param-value>true</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
   </servlet>

Below is a partial listing of the index.jsp file and the key="main.title" is
what can't be found which is defined in the cais.properties file and sits in
~/WEB-INF/classes dir.

---------- index.jsp -------------------

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<html:html>
<head>
<title>
   <bean:message key="main.title" />
</title>

Any help much appreciated.


message key not found

Posted by "G.L. Grobe" <ga...@grobe.org>.
Can someone clue me in if I'm on the right track in guessing that the
my.properties file is not being found because of this error. I have this
message key inside ~/WEB-INF/classes/my.properties. The html lines follow
below.

500 Internal Server Error
javax.servlet.jsp.JspException: Missing message for key main.title at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java,
Compiled Code) at /index.jsp._jspService(/index.jsp.java, Compiled Code) at
com.orionserver.http.OrionHttpJspPage.service(JAX, Compiled Code) at
com.evermind.server.http.HttpApplication.xj(JAX, Compiled Code) at
com.evermind.server.http.JSPServlet.service(JAX, Compiled Code) at
com.evermind.server.http.d3.sw(JAX, Compiled Code) at
com.evermind.server.http.d3.su(JAX, Compiled Code) at
com.evermind.server.http.ef.s1(JAX, Compiled Code) at
com.evermind.server.http.ef.do(JAX, Compiled Code) at
com.evermind.util.f.run(JAX, Compiled Code)

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<html:html>
<head>
<title>
   <bean:message key="main.title" />
</title>

Any help much appreciated.