Ernesto Reig wrote:
Do you want your app to change it's web.xml / context.xml? I wouldn't call it a good approach.One of the use case of my web app is to allow users to create new datasources. So in my web app I have a form to create the new datasource.One of the fields of the form is a input file type, where the user loads thedatasource driver jar. The other fields are used to get the values of theproperties that this datasource will have in web.xml and context.xml. So inmy web app I parse (using jdom) both xml's to create new nodes (datasources), and to update both files. And the question is: - Do I need to restart Tomcat in order that new created datasources be available?? - If yes (or not), is there some way to create new datasources (updating web.xml and context.xml) and to be available at once, that is, without restarting tomcat??
If you want to create datasources on the fly, use JMX - you can play with http://www.ceti.pl/~miki/komputery/jmx/. But I'm afraid it will not work with user supplied jdbc jar files (different classloader).
Why don't you want to create datasources by hand? It's not so difficult. -- Mikolaj Rydzewski <[EMAIL PROTECTED]>
smime.p7s
Description: S/MIME Cryptographic Signature