用struts做jsp无法从.properties文件中获取文本是怎么回事啊?
用struts做jsp无法从.properties文件中获取文本是怎么回事啊?
例如:<bean:message key="hello.jsp.title"/>
异常为:javax.servlet.ServletException: Missing message for key "hello.jsp.title"
<%@ page contentType="text/html;charset=gb2312" language="java"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<html:html locale="true">
<head>
<title><bean:message key="hello.jsp.title"/></title>
</head>
<body bgcolor="white">
<p>
<h2><bean:message key="hello.jsp.page.heading"/></h2><p>
<html:errors/><p>
<logic:present name="ch03.hello" scope="request">
<h2>Hello<bean:write name="ch03.helo" property="person"/>!<p></h2>
</logic:present>
<html:form action="/HelloWorld.do?action=gotName" focus="person">
<bean:message key="hello.jsp.prompt.person"/>
<html:text property="person" size="16" maxlength="16"/><br>
<html:submit property="submit" value="Submit"/>
<html:reset/>
</html:form><br>
<html:img page="/struts-power.gif" alt="Powerd by Struts"/>
</body>
</html:html>