bundles/org.apache.jasper.glassfish/src/org/apache/jasper/servlet/JspCServletContext.java
public URL getResource(String path) throws MalformedURLException {

        if (!path.startsWith("/"))
            throw new MalformedURLException("Path '" + path +
                                            "' does not start with '/'");
        URL url = new URL(myResourceBaseURL, path.substring(1));
        InputStream is = null;
        try {
            is = url.openStream();
        } catch (Throwable t) {
            url = null;
        } finally {
            if (is != null) {
                try {
                    is.close();
                } catch (Throwable t2) {
                    // Ignore
                }
            }
        }
        return url;
    }
public URL getResource(String path) throws MalformedURLException {

        if (!path.startsWith("/"))
            throw new MalformedURLException("Path '" + path +
                                            "' does not start with '/'");
        URL url = new URL(myResourceBaseURL, path.substring(1));
        InputStream is = null;
        try {
            is = url.openStream();
        } catch (Throwable t) {
            url = null;
        } finally {
            if (is != null) {
                try {
                    is.close();
                } catch (Throwable t2) {
                    // Ignore
                }
            }
        }
        return url;
    }
public URL getResource ( String path ) throws MalformedURLException { if ( ! path . startsWith ( "/" ) ) throw new MalformedURLException ( "Path '" + path + "' does not start with '/'" ) ; URL url = new URL ( myResourceBaseURL , path . substring ( 1 ) ) ; InputStream is = null ; try { is = url . openStream ( ) ; } catch ( Throwable t ) { url = null ; } finally { if ( is != null ) { try { is . close ( ) ; } catch ( Throwable t2 ) { // Ignore } } } return url ; }
Return a URL object of a resource that is mapped to the
specified context-relative path.

@param path Context-relative path of the desired resource

@exception MalformedURLException if the resource path is
not properly formed
Return a URL object of a resource that is mapped to the specified context - relative path .