throws ServletException, IOException {
InputStream is = null;
String id = request.getParameter(ID_PARAMETER_NAME);
try {
if(id==null) throw new DigitalObjectNotFoundException("id is null");
// Fix up any encoding issues:
id = PDURI.encodePlanetsUriStringAsUri(id).toASCIIString();
DigitalObjectRefBean digoRef = dh.get(id);
if(digoRef==null) throw new DigitalObjectNotFoundException("digital object "+id+" not found");
// set the metadata if it's contained within the digital object
DigitalObject object = digoRef.getDigitalObject();
for(Metadata md : object.getMetadata()) {
if(md.getName().equals(MIME_TYPE_METADATA_NAME))