Resource dir=RestDeleteApplication.toResource(pc,dirPath);
ConfigWebImpl config=(ConfigWebImpl) pc.getConfig();
try {
ConfigWebAdmin admin = ConfigWebAdmin.newInstance((ConfigWebImpl)pc.getConfig(),webAdminPassword);
Mapping[] mappings = config.getRestMappings();
Mapping mapping;
for(int i=0;i<mappings.length;i++){
mapping=mappings[i];
if(RestUtil.isMatch(pc,mapping,dir)){
admin.removeRestMapping(mapping.getVirtual());
admin.store();
}
}
}
catch (Exception e) {
throw Caster.toPageException(e);