• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Resource Bundle access through JSP.

 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic