mappingData = (MappingData) req.getNote(MAPPING_DATA);
}
// Map the request to its Adapter/Container and also it's Servlet if
// the request is targetted to the CoyoteAdapter.
mapper.map(req.serverName(), decodedURI, mappingData);
ContextRootInfo contextRootInfo = null;
if (mappingData.context != null && (mappingData.context instanceof ContextRootInfo
|| mappingData.wrapper instanceof ContextRootInfo )) {
if (mappingData.wrapper != null) {
contextRootInfo = (ContextRootInfo) mappingData.wrapper;
} else {
contextRootInfo = (ContextRootInfo) mappingData.context;
}
return contextRootInfo.getAdapter();
} else if (mappingData.context != null && mappingData.context.getClass()
.getName().equals("com.sun.enterprise.web.WebModule")) {
return ((V3Mapper) mapper).getAdapter();
}
return null;