?
Solved

why not display message in fmt.tld (JSTL)!

Posted on 2006-05-23
5
Medium Priority
?
302 Views
Last Modified: 2013-11-24
I am writing a login module. I use JSTL to display message from ApplicationResources. Following here:
<fmt:message key="index.login"/>
Although I am declaring taglib in JSP page and web.xml. But when running it only displays: ???index.login???
Please, help me! Thanks very much.
0
Comment
Question by:khoa235
3 Comments
 
LVL 4

Accepted Solution

by:
evnafets earned 252 total points
ID: 16748452
Your taglib seems to be working.
The ???index.login??? would indicate that it has found a resource bundle, but hasn't found the key "index.login" in it.
If you haven't specified a bundle, it will use the default bundle

Maybe try the setbundle tag:  <fmt:setBundle basename="ApplicationResources"/>

You can set this default in your web.xml file as well

<web-app>
...
<context-param>
  <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
  <param-value>ApplicationResources</param-value></context-param>
...
</web-app>

Cheers,
evnafets
0
 

Author Comment

by:khoa235
ID: 16748992
thanks evnafets.
I am processing what you say but until display ???index.login???
I am using MyEclipse J2EE Development.
0
 
LVL 14

Assisted Solution

by:boonleng
boonleng earned 248 total points
ID: 16751637
Make sure your properties file placed on the classpath.

../WEB-INF/classes/ApplicationResources.properties

Regards,
Boon Leng
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question