private InitializationParameter getDefaultServletInitParam( WebComponentDescriptor defaultServletDesc, String name, boolean create) { if (defaultServletDesc == null) { throw new RuntimeException("Default servlet is missing in web descriptors."); } InitializationParameter initParam = defaultServletDesc.getInitializationParameterByName(name); if (initParam == null && create) { initParam = new EnvironmentProperty(); defaultServletDesc.addInitializationParameter(initParam); initParam.setName(name); } return initParam; } }
private void setJspInitParameter(String property, String value) { WebComponentDescriptor jspDescriptor = getJspDescriptor( (WebBundleDescriptor)getParentNode().getDescriptor()); if (jspDescriptor != null) { // The description in the envior property is used as special // marker to indicate this jsp init is from weblogic.xml jspDescriptor.addInitializationParameter( new EnvironmentProperty(property, value, JSP_DESC)); } }
/** * Adds a new DOL descriptor instance to the descriptor instance associated with * this XMLNode * * @param descriptor the new descriptor */ public void addDescriptor(Object newDescriptor) { if (newDescriptor instanceof RoleReference) { if (DOLUtils.getDefaultLogger().isLoggable(Level.FINE)) { DOLUtils.getDefaultLogger().fine("Adding security role ref " + newDescriptor); } descriptor.addSecurityRoleReference( (RoleReference) newDescriptor); } else if (newDescriptor instanceof EnvironmentEntry) { if (DOLUtils.getDefaultLogger().isLoggable(Level.FINE)) { DOLUtils.getDefaultLogger().fine("Adding init-param " + newDescriptor); } descriptor.addInitializationParameter( (InitializationParameter) newDescriptor); } else if (newDescriptor instanceof MultipartConfig) { descriptor.setMultipartConfig((MultipartConfig)newDescriptor); } else super.addDescriptor(newDescriptor); }
if (initParams != null && initParams.length > 0) { for (WebInitParam initParam : initParams) { webCompDesc.addInitializationParameter( new EnvironmentProperty( initParam.name(), initParam.value(),