getServletContext().log("No attribute.", ex);
}
// Create Json response
List<JsonAttribute> attrs = new ArrayList<JsonAttribute>();
JsonAttribute attrData;
for (Attribute attribute: attributes) {
attrData = new JsonAttribute();
attrData.setTitle(attribute.getName());
attrData.setKey(attribute.getName());
attrs.add(attrData);
}
// Send JSON response
response.setContentType(Configuration.jsonContentType);
response.setCharacterEncoding(Configuration.contentEncoding);