我第一次根据例子做Struts,出以下错误,请帮我看看

04-03-08 chenwei316

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Missing message for key "index.title"

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)

org.apache.jsp.index_jsp._jspService(index_jsp.java:91)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)

javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)

javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

root cause

javax.servlet.jsp.JspException: Missing message for key "index.title"

org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:297)

org.apache.jsp.index_jsp._jspx_meth_bean_message_0(index_jsp.java:149)

org.apache.jsp.index_jsp._jspx_meth_html_html_0(index_jsp.java:112)

org.apache.jsp.index_jsp._jspService(index_jsp.java:82)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)

javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)

javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

note The full stack trace of the root cause is available in the Tomcat logs.

原例子是http://vip.6to23.com/hanson/htdocs/struts.htm

JSP代码是

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

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

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

<html:html locale="true">

<head>

<title><bean:message key="index.title" /></title>

<html:base/>

</head>

<body>

<html:errors/>

<html:form action="/logon">

<bean:message key="prompt.username"/>

<html:text property="username"/>

<br/>

<bean:message key="prompt.password"/>

<html:password property="password"/>

<br/>

<html:submit>

<bean:message key="index.logon"/>

</html:submit>

</html:form>

</body>

</html:html>

这是怎么回事啊?

点点
2004-03-16 17:32

看看.properties 文件中是不是没有这个键index.title

或者是没有找到.properties文件

cyz99
2004-03-17 12:52

properties文件存放在classes里面,你看看那个文件有没有这个值!