在 weblogic 上部署 spring 应用程序后,尝试加载 jsp 时出现以下错误:
javax.servlet.jsp.JspTagException: No message found under code 'label.firstname' for locale 'en_US'.
我究竟做错了什么?
JSP:
<form:form method="post" action="add.html" commandName="contact">
<table>
<tr>
<td><form:label path="firstname"><spring:message code="label.firstname"/></form:label></td>
<td><form:input path="firstname" /></td>
</tr>
.....
</table>
</form:form>
春天上下文:
<bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basename" value="messages" />
<property name="defaultEncoding" value="UTF-8" />
</bean>
Web-app(war) 结构
META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/messages_en.properties
WEB-INF/classes/org/
WEB-INF/classes/org/spring/
WEB-INF/classes/org/spring/controller/
WEB-INF/classes/org/spring/controller/ContactController.class
WEB-INF/classes/org/spring/dao/
WEB-INF/classes/org/spring/dao/ContactDAO.class
WEB-INF/classes/org/spring/dao/ContactDAOImpl.class
WEB-INF/classes/org/spring/entity/
WEB-INF/classes/org/spring/entity/Contact.class
WEB-INF/classes/org/spring/service/
.....