Tuesday, January 10, 2006

Here's the summary of my findings with using Spring under TIBCO PortalBuilder 5.1.

  1. DOCTYPE is removed from all XML files under WEB-INF.

  2. As a result, any Spring class which validates XML files when reading won't work (that's all of them that I have seen so far)

  3. You need to extend at the XmlWebApplicationContext class to disable validation on XML file load. This is done by overriding the initBeanDefinitionReader() method and calling setValidating(false).

  4. You need to add a new context-param definition to the context in web.xml to force your non-validating context implementation to be used. The name of this parameter is contextClass.

  5. You need to extend at the XmlPortletApplicationContext class to disable validation on XML file load. This is done by overriding the initBeanDefinitionReader() method and calling setValidating(false).

  6. You need to add a new init-param to each Spring portlet defined in portlet.xml to force your non-validating context implementation to be used. The name of this parameter is contextClass.

  7. You need to ensure that the content type for your views does not include a charset. In other words, text/html is OK, but text/html;charset=UTF-8 is not. The TIBCO implementation does not ignore the charset.



Even with the above changes, I've been unable to deploy the Spring Portlet Sample sample application into TIBCO Portal Builder 5.1.

The final issue appears to be due to the view resolver implementation in Spring - my customised view class isn't being instantiated, so the removal of the charset definition isn't happening. I'm going to post on the spring forums for help on this one - I'm stumped.

No comments: