I'm writing simple www application using jsp and servlets on Tomcat 7.0. It's multilingual and i want to externalize all messages for easy translation. I am trying to achieve this using fmt:message tag. This is my test page:
SimplePage.jsp
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<fmt:setLocale value="en_US" scope="application" />
<fmt:setBundle basename="localization.message" var="b" />
<html>
<body>
<fmt:message key="key1" bundle="${b}" />
</body>
message_en_US.properties
key1=test
Output of page is:
???key1???
I've put message_en_US.properties into source folder named "localization". I've tried also putting it into WEB-INF, WebContent and src (with changing basename of bundle) - result is the same. I appreciate any help.