• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resource Bundle access through JSP.

 
Phillipe Rodrigues
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i'm trying the the locale specific data entry in a jsp page through use of PropertyResourcebundle class.
i create a .properties file(Login_en_US.properties) which would be accessed through the PropertyResourcebundle class



I get exception "MissingResourceException" on execution of the code.Please let me kow where should the properties file be placed for the proper execution.

I'm trying it using MYEclipse6.0 IDE,Jdk1.5.
 
karthikeyan Chockalingam
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do not append properties in the end. For more details please refer

http://theasolutions.com/tutorials/java_rbundle.jsp
[ May 30, 2008: Message edited by: karthi keyan ]
 
Phillipe Rodrigues
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The .properties file reside in the lib directory of the web-application.So how to specify it in code.

Tomcat5->webapp->wapp->WEB-INF->classes->lib->Login.properties
 
karthikeyan Chockalingam
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest moving the Login.properties under classes

Tomcat5->webapp->wapp->WEB-INF->classes->Login.properties

In that case we can use



If we place it under com.xyz package it should be "com.xyz.Login"
 
Phillipe Rodrigues
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we create a .jar file containing the .properties file and place it in
the lib folder. If yes then how can we access it in our code.

I'm asking the above since i have around 15-17 .properties file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic