Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The value is not displaying correctly in I18N

Krishnamoorthy Vuyala Muralidharan
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic