// get some info from the MBean (it seems awkward I have to query for the bean I'm basically dealing with)
EmsConnection connection = context.getParentResourceComponent().getEmsConnection();
EmsBean warBean = connection.getBean(resource.getResourceKey());
// this refresh is important in case EMS is caching a stale version of this object. It can happen if
// a user deletes and then recreates the same object.
List<EmsAttribute> contextRootAttribs = warBean.refreshAttributes(EMS_ATTRIBUTE_PATH);
String contextRoot = (String) contextRootAttribs.get(0).getValue();
List<EmsAttribute> docBaseAttribs = warBean.refreshAttributes(EMS_ATTRIBUTE_DOC_BASE);
String docBase = (String) docBaseAttribs.get(0).getValue();
File docBaseFile = new File(docBase);
String filename = (docBaseFile.isAbsolute()) ? docBase