This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to access string resources (.properties entries) from inside a servlet ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to access string resources (.properties entries) from inside a servlet ?" Watch "How to access string resources (.properties entries) from inside a servlet ?" New topic
Author

How to access string resources (.properties entries) from inside a servlet ?

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 551
Hi
Thank you for reading my post.
how i can retrieve some string resources from my bundle.properties file?
the file is located in : servlet/bundle.properties
I want to retrieve some of its key and use them inside the servlet java file.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If you're doing it a ResourceBundle, you'll need to move the file to a directory where your server can see it.

See:
http://wiki.apache.org/tomcat/HowTo#head-45c3314139cb900ddd43dde2ff671532e6e844bc


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to access string resources (.properties entries) from inside a servlet ?
 
It's not a secret anymore!