Attached is a demo.Demo class which utilizes a PropertiesManager class. The PropertiesManager class creates a properties file to keep track of properties files, then creates and uses properties files with and without defaults. I use it to demonstrate to students.
You can put anything you like into any scope (page, session, application) in an application, so you use property files just like you would with any program or application. There is no reason why you cannot create and use classes and objects in struts. This PropertiesManager is probably too unwieldy, but you can make something that fits your own needs. Micael At 12:07 AM 9/22/2002 -0700, you wrote: >Hello, > >This is a very "newbie" question I'm sure, so this might not be the >appropriate forum. Maybe it belongs in the Tomcat forum? Not sure. > >Pretty basic objective.... I just want to be able to put application >settings (things like path names, integer values, etc) in a *.properties >file and access those properties from within my tomcat/struts(1.1) >application. I see quite a bit of talk about >ApplicationResources.properties, but it seems like people are only using >that to store and retrieve messages. I'd rather not mix my messages with >my settings. How do you do it? I'm aware of the java.util.properties >class.... but I don't really know how to efficiently use it within the >application servlet context (I don't want to reload it with every >request)..... and I wouldn't know when to load it into application >scope..... anyway, you see that I don't have a clue. I can think of >plenty of ways to do it, but I would like know the most common/accepted >method(s). So any tips would be much appreciated :) > >Thanks! > > > > > >--------------------------------- >Do you Yahoo!? >New DSL Internet Access from SBC & Yahoo!
demo.zip
Description: Zip archive
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>