bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/JspUtil.java
private static final String [] split(String path, String pat) {
        ArrayList<String> comps = new ArrayList<String>();
        int pos = path.indexOf(pat);
        int start = 0;
        while( pos >= 0 ) {
            if(pos > start ) {
                String comp = path.substring(start,pos);
                comps.add(comp);
            }
            start = pos + pat.length();
            pos = path.indexOf(pat,start);
        }
        if( start < path.length()) {
            comps.add(path.substring(start));
        }
        String [] result = new String[comps.size()];
        for(int i=0; i < comps.size(); i++) {
            result[i] = comps.get(i);
        }
        return result;
    }
private static final String [] split(String path, String pat) {
        ArrayList<String> comps = new ArrayList<String>();
        int pos = path.indexOf(pat);
        int start = 0;
        while( pos >= 0 ) {
            if(pos > start ) {
                String comp = path.substring(start,pos);
                comps.add(comp);
            }
            start = pos + pat.length();
            pos = path.indexOf(pat,start);
        }
        if( start < path.length()) {
            comps.add(path.substring(start));
        }
        String [] result = new String[comps.size()];
        for(int i=0; i < comps.size(); i++) {
            result[i] = comps.get(i);
        }
        return result;
    }
Splits a string into it's components.
@param path String to split
@param pat Pattern to split at
@return the components of the path