String contextRoot = null;
InputStream is = null;
try {
is = node.getAsset().openStream();
JbossWebDescriptor descriptor = Descriptors.importAs(JbossWebDescriptor.class).fromStream(is);
contextRoot = descriptor.getContextRoot();
} catch (NullPointerException e) {
// no asset was given, ignoring
} finally {
IOUtils.closeQuietly(is);
}