[jetty-user] Embedded jetty: how to "override" context init parameter specified in web.xml

Константин Фадеев <[email protected]>
Newsgroups gmane.comp.java.jetty.support
Message-ID <[email protected]>
 Hello, everybody!

In my web.xml I have a context parameter named 'foo':

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">

  <context-param>
    <description>My super parameter</description>
    <param-name>foo</param-name>
    <param-value>bar</param-value>
  </context-param>
 ....


And in java code I run jetty in embedded mode using WebAppContext to configure application with this web.xml:

      WebAppContext context = new WebAppContext();
      context.setDescriptor("D:\\Projects\\testapp\\build\\web\\WEB-INF\\web.xml");
      context.setResourceBase("D:\\Projects\\testapp\\build\\web");
      context.setContextPath("/test");

The question is how i can overwrite 'foo' parameter value from java code?
There is no context.setInitParameter() method.


//Konstantin

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.