-
1. Re: Portlet Header Injection
esmith1 Apr 9, 2008 9:27 AM (in response to biglou214)I am injecting both link and script this way without problem. One thought might be if your portlet-name (welcome) did not match the same value in portlet.xml?
Also check your jboss log file after you deploy -- I've had silent failures when the parsing of the jboss-portlet.xml fails due to a syntax error. After the INFO
[TomcatDeployer] deploy line in the log you should see an INFO [PortletAppDeployment] Parsing /xyz/jboss-portlet.xml line.
File ideally would now use DTD at top, although shouldnt matter.<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE portlet-app PUBLIC "-//JBoss Portal//DTD JBoss Portlet 2.6//EN" "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd"> <portlet-app> ...
-
2. Re: Portlet Header Injection
biglou214 Apr 22, 2008 11:13 AM (in response to biglou214)Thanks for the response. Turns out everything was fine in my jboss-portlet.xml. I ended up grabbing the jboss source and walking through the code in the debugger. Turns out that the HeaderInterceptor was never being called. At some point it looks like my Interceptor declarations were messed up. Just in case anyone else gets into this state there are two lines that need to be in your jboss-service.xml /server/default/deploy/jboss-portal/sar/META-INF/jboss-service.xml.
The first is:<mbean code="org.jboss.portal.core.aspects.portlet.HeaderInterceptor" name="portal:service=Interceptor,type=Portlet,name=Header" xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean"> <xmbean/> </mbean>
The second, and the one that had been removed in my deployment is in the depends-list for the JbossInterceptorStackFactory:<depends-list-element>portal:service=Interceptor,type=Portlet,name=Header</depends-list-element>
After adding that in, everything works like a charm!