This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See welcome thread
Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

The value is not displaying correctly in I18N  RSS feed

Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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. 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
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!