@Override public URL getResource(String path) { URL res = super.getResource(path); if (res != null) { InputStream is = null; try { is = res.openStream(); } catch (IOException e) { return null; } finally { if (is != null) { try { is.close(); } catch (IOException e) { } } } } return res; }
/** * Returns a String containing the value of the named context-wide initialization parameter, or null if the parameter does not exist. * * This method can make available configuration information useful to an entire "web application". For example, it can provide a * webmaster's email address or the name of a system that holds critical data. **/ public java.lang.String getInitParameter( String name ) { return (String) getContextParams().get( name ); }
/** * @deprecated use log( String, Throwable ) **/ public void log( Exception e, String message ) { log( message, e ); }
ServletContext getServletContext() { if (_servletContext == null) { _servletContext = new ServletUnitServletContext( this ); } return _servletContext; }
/** * Returns a String containing the value of the named context-wide initialization parameter, or null if the parameter does not exist. * * This method can make available configuration information useful to an entire "web application". For example, it can provide a * webmaster's email address or the name of a system that holds critical data. **/ public java.lang.String getInitParameter( String name ) { return (String) getContextParams().get( name ); }
/** * @deprecated use log( String, Throwable ) **/ public void log( Exception e, String message ) { log( message, e ); }
ServletContext getServletContext() { if (_servletContext == null) { _servletContext = new ServletUnitServletContext( this ); } return _servletContext; }
/** * Returns the names of the context's initialization parameters as an Enumeration of String objects, * or an empty Enumeration if the context has no initialization parameters. **/ public java.util.Enumeration getInitParameterNames() { return getContextParams().keys(); }
/** * @deprecated use log( String, Throwable ) **/ public void log( Exception e, String message ) { log( message, e ); }
ServletContext getServletContext() { if (_servletContext == null) { _servletContext = new ServletUnitServletContext( this ); } return _servletContext; }
@Override public URL getResource(String path) { URL res = super.getResource(path); if (res != null) { InputStream is = null; try { is = res.openStream(); } catch (IOException e) { return null; } finally { if (is != null) { try { is.close(); } catch (IOException e) { } } } } return res; }
/** * Returns the names of the context's initialization parameters as an Enumeration of String objects, * or an empty Enumeration if the context has no initialization parameters. **/ public java.util.Enumeration getInitParameterNames() { return getContextParams().keys(); }
/** * Returns the names of the context's initialization parameters as an Enumeration of String objects, * or an empty Enumeration if the context has no initialization parameters. **/ public java.util.Enumeration getInitParameterNames() { return getContextParams().keys(); }
/** * Returns a String containing the value of the named context-wide initialization parameter, or null if the parameter does not exist. * * This method can make available configuration information useful to an entire "web application". For example, it can provide a * webmaster's email address or the name of a system that holds critical data. **/ public java.lang.String getInitParameter( String name ) { return (String) getContextParams().get( name ); }
void removeInitParameter( String name ) { getContextParams().remove( name ); }
void setInitParameter( String name, Object initParameter ) { getContextParams().put( name, initParameter ); }
void setInitParameter( String name, Object initParameter ) { getContextParams().put( name, initParameter ); }
void removeInitParameter( String name ) { getContextParams().remove( name ); }
void setInitParameter( String name, Object initParameter ) { getContextParams().put( name, initParameter ); }
void removeInitParameter( String name ) { getContextParams().remove( name ); }