Hello All
I am using the I18N to display the messages in my
JSP. I am using JSTL 1.1, JSP 2.0,
Tomcat 6.0.14.
ControllerMessages.java is as follows:
___________________________________________________________
package com.controller.messages;
import java.util.ListResourceBundle;
public class ControllerMessages extends ListResourceBundle {
static final Object[][] contents = {
{ "CMP", "Components" },
{ "STATUS", "Status" },
{ "CE", "Content Engine" },
{ "ALIVE", "ALIVE" },
{ "OSE", "Object store exists" },
{ "TRUE", "TRUE" },
{ "FALSE", "FALSE" },
};
public Object[][] getContents() {
return contents;
}
}
JSP code is as follows:
<fmt:bundle basename="com.controller.messages.ControllerMessages"/>
<fmt:message key="CE"/>
<fmt:message key="OSE"/>
...
When I run the above JSP, it displays:
???CE??? - instead of "Content Engine"
???OSE??? - instead of "Object store exists"
___________________________________________________________
Even when I run the JSP examples from Tomcat, it displayed ???greeting_message???, I mean it displays the key with surrounding ???
Can you please tell me why I am not getting the value from the resource bundle?? I use
java classes instead of properties files.
Thank you for your reply.
Kind regards
Kris