String servletName, String whatClaimsToBeAServletClass,
String pattern, Properties initParams) {
MutableWebAppServlet servlet = MutableWebAppServlet.create();
servlet.setServletName(servletName);
servlet.setServletClass(whatClaimsToBeAServletClass);
MutableWebAppInitParam initParam;
for (Object okey : initParams.keySet()) {
String key = okey.toString();
String value = initParams.getProperty(key);
initParam = MutableWebAppInitParam.create();
initParam.setParamName(key);
initParam.setParamValue(value);
servlet.addInitParam(initParam);
}
config.addServlet(servlet);
MutableWebAppServletMapping servletMapping
= MutableWebAppServletMapping.create();