/** * Return a String representation of this component. */ public String toString() { StringBuilder sb = new StringBuilder(); if (getParent() != null) { sb.append(getParent().toString()); sb.append("."); } sb.append("StandardWrapper["); sb.append(getName()); sb.append("]"); return (sb.toString()); }
/** * Return a String representation of this component. */ public String toString() { StringBuilder sb = new StringBuilder(); if (getParent() != null) { sb.append(getParent().toString()); sb.append("."); } sb.append("StandardWrapper["); sb.append(getName()); sb.append("]"); return (sb.toString()); }
public String getEngineName() { return ((StandardContext)getParent()).getEngineName(); }
public String getEngineName() { return ((StandardContext)getParent()).getEngineName(); }
/** * Log the abbreviated name of this Container for logging messages. */ protected String logName() { StringBuilder sb = new StringBuilder("StandardWrapper["); if (getParent() != null) sb.append(getParent().getName()); else sb.append("null"); sb.append(':'); sb.append(getName()); sb.append(']'); return (sb.toString()); }
public String getEngineName() { return ((StandardContext)getParent()).getEngineName(); }
private String getWebModuleKeyProperties() { StringBuilder keyProperties = new StringBuilder(",WebModule=//"); String hostName = getParent().getParent().getName(); if (hostName == null) { keyProperties.append("DEFAULT"); } else { keyProperties.append(hostName); } String contextName = getParent().getName(); if (!contextName.startsWith("/")) { keyProperties.append('/'); } keyProperties.append(contextName); return keyProperties.toString(); }
public Set<String> setServletSecurity(ServletSecurityElement servletSecurity) { if (!((Context) wrapper.getParent()).isStarting()) { throw new IllegalStateException(sm.getString ("servletRegistration.ise", ((Context) wrapper.getParent()).getPath())); } if (servletSecurity == null) { throw new IllegalArgumentException(sm.getString("servletRegistration.iae")); } return wrapper.setServletSecurity(servletSecurity); }
public void setRunAsRole(String roleName) { if (!((Context) wrapper.getParent()).isStarting()) { throw new IllegalStateException(sm.getString ("servletRegistration.ise", ((Context) wrapper.getParent()).getPath())); } if (roleName == null) { throw new IllegalArgumentException(sm.getString("servletRegistration.iae")); } wrapper.setRunAs(roleName); }
public Set<String> setServletSecurity(ServletSecurityElement servletSecurity) { if (!((Context) wrapper.getParent()).isStarting()) { throw MESSAGES.cannotAddServletRegistrationAfterInit(((Context) wrapper.getParent()).getPath()); } if (servletSecurity == null) { throw MESSAGES.invalidServletRegistrationArguments(); } return wrapper.setServletSecurity(servletSecurity); }
public void setRunAsRole(String roleName) { if (!((Context) wrapper.getParent()).isStarting()) { throw MESSAGES.cannotAddServletRegistrationAfterInit(((Context) wrapper.getParent()).getPath()); } if (roleName == null) { throw MESSAGES.invalidServletRegistrationArguments(); } wrapper.setRunAs(roleName); }
public boolean setInitParameter(String name, String value) { if (!((Context) wrapper.getParent()).isStarting()) { throw MESSAGES.cannotAddServletRegistrationAfterInit(((Context) wrapper.getParent()).getPath()); } if (name == null || value == null) { throw MESSAGES.invalidServletRegistrationArguments(); } if (wrapper.findInitParameter(name) == null) { wrapper.addInitParameter(name, value); return true; } else { return false; } }
public void sendNotification(Notification notification) { if (broadcaster == null) { broadcaster = ((StandardEngine)getParent().getParent().getParent()).getService().getBroadcaster(); } if (broadcaster != null) { broadcaster.sendNotification(notification); } return; }
public void setMultipartConfig(MultipartConfigElement multipartConfig) { if (!((Context) wrapper.getParent()).isStarting()) { throw new IllegalStateException(sm.getString ("servletRegistration.ise", ((Context) wrapper.getParent()).getPath())); } if (multipartConfig == null) { throw new IllegalArgumentException(sm.getString("servletRegistration.iae")); } Multipart multipart = new Multipart(); multipart.setLocation(multipartConfig.getLocation()); multipart.setMaxFileSize(multipartConfig.getMaxFileSize()); multipart.setMaxRequestSize(multipartConfig.getMaxRequestSize()); multipart.setFileSizeThreshold(multipartConfig.getFileSizeThreshold()); wrapper.setMultipartConfig(multipart); }
public void setMultipartConfig(MultipartConfigElement multipartConfig) { if (!((Context) wrapper.getParent()).isStarting()) { throw MESSAGES.cannotAddServletRegistrationAfterInit(((Context) wrapper.getParent()).getPath()); } if (multipartConfig == null) { throw MESSAGES.invalidServletRegistrationArguments(); } Multipart multipart = new Multipart(); multipart.setLocation(multipartConfig.getLocation()); multipart.setMaxFileSize(multipartConfig.getMaxFileSize()); multipart.setMaxRequestSize(multipartConfig.getMaxRequestSize()); multipart.setFileSizeThreshold(multipartConfig.getFileSizeThreshold()); wrapper.setMultipartConfig(multipart); }