Michael D. Spence wrote:
Fair enough, and I know that would work as well. I just prefer it when you can use a method like the web.inf to set them.I've been wondering the same myself. As far as I can see there is no such facility, so you may have to do something with having a config servlet (that doesn't server anything to users) that starts up first, reads in params via the usual web.xml route, and then have a factory class to provide config details to your web service.I just used a properties file and java.util.Properties.
Is there a better way ?
But then, as I said you could use a factory and get that to supply the config details. Behind the scenes it could either use the servlet config or a properties file. You could set the concrete class that implements the factory interface as a property.
Jon.