title: Modify WebInitParam in Servlet 3.0 when the project in packaged in a WAR
body: <p>In my project I'm using Servlet 3.0 and I've tried to use annotations.</p>
  
  <p>To init the connection parameters for the DB I use this in my servlet :</p>
  
  <pre><code>@WebServlet(name = "FrontServlet", urlPatterns = {"/index"},
          initParams = {
          @WebInitParam(name = "userDB", value = "root"),
          @WebInitParam(name = "passwordDB", value = "*****")})
  </code></pre>
  
  <p>Now when I packaged the project in a WAR I've no web.xml  so I can't edit the init parameters as I used to do whith older servlet version.</p>
  
  <p>My question is, can I edit my init parameters when the project is packaged in a WAR? If yes how? Otherwise what approach should I use to store my init parameters and be able to modify them in the WAR?</p>
  
  <p>If possible I would like to avoid to recreate the whole web.xml with all URL-patterns, etc...</p>
  
  <p>EDIT :</p>
  
  <p>Finally I kept :</p>
  
  <pre><code>@WebServlet(name = "FrontServlet", urlPatterns = {"/index"})
  </code></pre>
  
  <p>And I load DB params using <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Properties.html" rel="nofollow">Properties</a>, accessing the config file with <code>getClass().getClassLoader().getResourceAsStream("servlet/config/config.ini")</code></p>