[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Java + LDAP



Title: RE: Java + LDAP

The simplest way is to use modifyAttributes method and pass in a modification operation (REMOVE_ATTRIBUTE).

Care must be taken because if the attribute value is not specified this will delete the entire attribute.  Also if the value to be removed is the last value of the attribute, it will also delete the attribute.

BasicAttributes attrs = new BasicAttributes("groupId","2")  //assuming you want to remove the attribute value "2"
ctx.modifyAttributes(member, DirContext.REMOVE_ATTRIBUTE, attrs);



Regards,

Gene Fermindoza