[jboss-dev-forums] [Design of JBoss Portal] - Setting content type for the whole portal : ContentTypeInter

free1000 do-not-reply at jboss.com
Mon Jul 24 03:33:24 EDT 2006


I have been trying to set the content type for the returned portal page to application/xhtml+xml in order to enable firefox to display inline svg

After a few experiments I've discovered that I can't affect the overall page content type by changing the top level layout jsp. 

A look at the Portal source indicated to me that the ContentTypeInterceptor class appears to always set the content type to MediaType.HTML

I'm wondering why this is, and what a good suggested way of customizing this interceptor might be.  My first thought is to subclass ContentTypeInterceptor and override invoke to deliver application/xhtml+xml, then just replace this interceptor in my deployment

I'm curious about why this ContentTypeInterceptor does what it does as I can't understand why its a good idea to override the contentType directives in the users content. 

The only idea I can come up with is that it helps handle content rendered from third party portlets which may not generate xhtml properly, by dropping all content to a lowest common denominator text/html and UTF-8. 




 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960248#3960248

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960248



More information about the jboss-dev-forums mailing list