Parsing a Composite Name In the composite name space, forward-slash (/) separates the composite components. try { CompositeName composite = new CompositeName( "cn=John,o=hits/report/summary.txt"); String first = composite.get(0); // summary.txt String last = composite.get(composite.size()-1); // cn=John,o=hits // wiz.com/cn=John,o=hits/report/summary.txt composite.add(0, "wiz.com"); // wiz.com/cn=John,o=hits/summary.txt composite.remove(2); } catch (NamingException e) { }