public String getRealPath(String path) {

        if (!myResourceBaseURL.getProtocol().equals("file"))
            return (null);
        if (!path.startsWith("/"))
            return (null);
        try {
            return
                (getResource(path).getFile().replace('/', File.separatorChar));
        } catch (Throwable t) {
            return (null);
        }

    }
public String getRealPath(String path) {

        if (!myResourceBaseURL.getProtocol().equals("file"))
            return (null);
        if (!path.startsWith("/"))
            return (null);
        try {
            return
                (getResource(path).getFile().replace('/', File.separatorChar));
        } catch (Throwable t) {
            return (null);
        }

    }
public String getRealPath ( String path ) { if ( ! myResourceBaseURL . getProtocol ( ) . equals ( "file" ) ) return ( null ) ; if ( ! path . startsWith ( "/" ) ) return ( null ) ; try { return ( getResource ( path ) . getFile ( ) . replace ( ' ' , File . separatorChar ) ) ; } catch ( Throwable t ) { return ( null ) ; } }
Return the real path for the specified context-relative
virtual path.

@param path The context-relative virtual path to resolve
Return the real path for the specified context - relative virtual path .