long resourceLastMod = 0;
InputStream resourceStream = null;
// first see if resource comes from weblog's shared theme
try {
WeblogTheme weblogTheme = weblog.getTheme();
if(weblogTheme != null) {
ThemeResource resource = weblogTheme.getResource(resourceRequest.getResourcePath());
if(resource != null) {
resourceLastMod = resource.getLastModified();
resourceStream = resource.getInputStream();
}
}