You're looking for <init-param>. You can add these parameters to any
filter or servlet, or at the top-level for the entire webapp, and get
them when the filter or servlet runs (or any time you can get an
instance of the ServletContext which represents the webapp).
The usual way of doing this is to create a ServletContextListener
which
implements the init() method, grabs the values from the <init-param>
parameters, and stuffs them into the "application" scope. Although
this
is typically called the "application", you get it like this:
public void contextInitialized(ServletContextEvent sce)
{
ServletContext application = sce.getServletContext();
String myParam = application.getInitParameter("my-param");
application.setAttribute("myParam", new Integer(myParam));
}
You can pretty much do anything you'd like at this point.
Hope that helps,
-chris