1 Reply Latest reply on Dec 19, 2001 10:38 AM by David Ward

    Passing startup parameters to war

    Theunis de Jongh Newbie

      I want to deploy a war in different scenarios,
      necessitating the changing of certain environment
      parameters.

      How can I set this up outside of the war, for it
      to access ?

        • 1. Re: Passing startup parameters to war
          David Ward Newbie

          create an "init" servlet that has a <load-on-startup> tag in the web.xml so it's init method gets called on war deploy. Then, in your init method, read in a config properties file (or xml, or whatever) off the file system someplace. The path to the config file can be an <init-param> under in web.xml, but the contents of the file can be different for each of your different environments.