data.getResponse().setDateHeader("Last-Modified", System.currentTimeMillis());
break;
}
//Set the ContentType of the page
CapabilityMap cm = ((JetspeedRunData)data).getCapability();
MimeType mime = cm.getPreferredType();
String characterSet = JetspeedResources.getString(JetspeedResources.CONTENT_ENCODING_KEY,"utf-8");
data.setContentType( mime.getContentType());
if ( mime != null )
{
MediaTypeEntry media = (MediaTypeEntry)Registry.getEntry(Registry.MEDIA_TYPE, mime.getCode());
if ( media != null && media.getCharacterSet() != null)
{
characterSet = media.getCharacterSet();
}
}
data.setCharSet( characterSet );
if (logger.isDebugEnabled())
{
logger.debug( "JetspeedTemplatePage: Setting type to: " + cm.getPreferredType().getContentType()
+ "; charset=" + JetspeedResources.getString(JetspeedResources.CONTENT_ENCODING_KEY,"utf-8")
);
}
}