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

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.
khoa235Asked:
Who is Participating?
 
evnafetsCommented:
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
 
khoa235Author Commented:
thanks evnafets.
I am processing what you say but until display ???index.login???
I am using MyEclipse J2EE Development.
0
 
boonlengCommented:
Make sure your properties file placed on the classpath.

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

Regards,
Boon Leng
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.