File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes GWT project and properties files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "GWT project and properties files" Watch "GWT project and properties files" New topic

GWT project and properties files

George Vagenas

Joined: Mar 04, 2008
Posts: 11
Hello everybody,

I am in the middle of a GWT project that i need to use some property files for the database information i use there. For this purpose i use the apache Commons Configuration kit, but my problem is that since this properties are needed in various classes in my project i am trying to find a way to use them in a loose coupling way and not include the configuration code in every class.

Any ideas?

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

I don't know much about GWT but I can speak a little about properties objects in a web app.

If the properties files are read at startup, using a context listener and then bound to context scope, it should be pretty easy for your servlet code to pass a reference to any classes that need them. Do you have a more specific example that you can talk about?

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: GWT project and properties files
It's not a secret anymore!