On Wed, Jun 09, 2010 at 05:20:22PM +0200, Thomas Kloeber wrote: > Mark H. Wood wrote on 09.06.2010 17:03: > > On Wed, Jun 09, 2010 at 04:19:17PM +0200, Thomas Kloeber wrote: > > > >> the problems I have are: > >> > >> * the IP address of the backing database is one of the parameters > >> that needs to be configured (in context.xml), so I can't get any > >> data from the db unless it is configured... > >> * the other confgurables (SPNEGO and kerberos stuff) are in web.xml > >> and as long as they are not set up correct, my app won't start! > >> * sounds like a catch 22 to me ... > >> > > Context parameter pointing to a properties file somewhere? Then you > > can put the settings wherever you want them, and move them anytime > > with minimal fuss. Install the app. outside of any appBase and use an > > external Context file > > ($CATALINA_BASE/conf/Catalina/<hostname>/<contextname>.xml) > > to point to it and provide the parameter's value: > > > > <Context docBase='/some/where/myapp'> > > <Parameter name='configuration' > > value='/some/where/else/myapp.properties' > > description='where the configurables are'/> > > </Context> > > > > You could just define the configurables as separate Parameters, but I > > would keep them separated from configuration of the servlet container > > (which the above is) if possible. Tastes vary. > > > sounds like a good idea, but what about the web.xml stuff? Can I use > some redirection there as well?
I guess I don't understand why web.xml must be customized at all. In Tomcat, <Resource>s can be configured in a <Context>; <Environment> entries can be made in a <Context>; initialization parameters can be set in a <Context>. Is there something else? And Tomcat allows you to place the <Context> declaration outside of the app. as noted above. > Caldarale, Charles R wrote on 09.06.2010 17:04: > >> how do you "make changes in context.xml inside archive"? > >> > > Unpack it with the jar utility, update, repack. Alternatively, you can > > supply the<Context> element in a separate file, and have the admin put > > that in conf/Catalina/[host]/[appName].xml after modifying the > > site-specific attributes. > I was afraid you say something like that, but to me that is why to > complicated/error prone... I agree. This always feels to me like telling someone that he can configure his word processor by using a binary editor on the executable. Customers should never have to put their fingers inside the app; it should get customer-specific information from some place whose location is told to it at startup. -- Mark H. Wood, Lead System Programmer mw...@iupui.edu Balance your desire for bells and whistles with the reality that only a little more than 2 percent of world population has broadband. -- Ledford and Tyler, _Google Analytics 2.0_
pgpwUHUXGxhao.pgp
Description: PGP signature