Niklas Rosencrantz
Niklas Rosencrantz

Reputation: 26647

Enabling my jstl fmt messages

I've got a properties file in my classpath with items like the following

PI20=Fältet "Ankomstdatum tom" har datumformatet åååå-mm-dd eller ååååmmdd. # AF Sök
PI61=Sökresultatet är exporterat. # AF Sök
PI3000=Rapporter och uppdragshandlingar till Varumärkeseneheten finns på << 1 >>. Rapporter och uppdragshandlingar till Designeneheten finns på << 2 >>. # AF Registrera uppdrag

In my JSP I do this

<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<fmt:setBundle basename="messages.properties"/>
<fmt:message key="PI61"/>

but my message does not appear. How can I enable my messages according to use for the fmt tag?

Thank you

Upvotes: 0

Views: 818

Answers (1)

nobeh
nobeh

Reputation: 10039

You should not include .properties in basename; and assuming that messages.properties is located at the root of classpath.

Upvotes: 1

Related Questions